Create link when retreive from database

Hi, I created database called "Homepage", and i created table
called "homenews" inside of "homepage" database.
I also created two column which is "News_Name" and
"News_URL".
I use dreamweaver and is works great when i retreive from
databse, but i want to change to have link, let say first colmn for
"news_name i put cnn, and second colmn for News_URL i put
www.cnn.com, my question is that how i can write php code to create
url link of "www.cnn.com" on the text called "cnn" when retreive
from database!
is this is correct code!
<?php echo '<a
href="'.$row_HomeNews[News_URL].'">'.$row_HomeNews[News_Name
].'</a>'; ?>
if so when why I'm getting errors!
AM

Alidad wrote:
> Hi, I created database called "Homepage", and i created
table called "homenews"
> inside of "homepage" database.
> I also created two column which is "News_Name" and
"News_URL".
>
> I use dreamweaver and is works great when i retreive
from databse, but i want
> to change to have link, let say first colmn for
"news_name i put cnn, and
> second colmn for News_URL i put www.cnn.com, my question
is that how i can
> write php code to create url link of "www.cnn.com" on
the text called "cnn"
> when retreive from database!
>
> is this is correct code!
>
> <?php echo '<a
href="'.$row_HomeNews[News_URL].'">'.$row_HomeNews[News_Name
> ].'</a>'; ?>
>
> if so when why I'm getting errors!
What errors are you getting?
For the looks of your code, if you have www.cnn.com in the
News_URL column, then the link you're generating will not go to
CNN. You need to include the
http:// as part of your link. Even though you
can copy and paste www.cnn.com into the browser and go to the
correct place, if it is used as a link in a page, then it has to
have the
http:// to go to be able to leave the current
site and go to the correct place.
Danilo Celic
| Extending Knowledge Daily :
http://CommunityMX.com/
| Adobe Community Expert

Similar Messages

  • Error when creating link to documents from material

    Hi all,
    while creating the purchase order the error message "Error when creating link to documents from material 61260224060" is displayed.
    why this error message is displayed.?
    Regards,
    GaneshRaja

    Hello Ganesh
    Please check material master - view 'Bases data 2'.
    There is checkbox 'No link'. You can activate this checkbox if you are not storing any drawing/designe docuemnt for this material.
    Try to do this and check out again.....
    If this helps you in resolving your issue, i would appreciate if you reward the answer with suitable points.
    Best Regards
    Avinash

  • LTR - Error occurred when selecting from database

    Hi,
    We created couple of configurations using LTRC in our SLT systems. When i try to check these in transaction LTR, they are not displayed, just getting the error - Error occurred when selecting from database (Attached screenshot). All the required SICF for SLT has already been activated. Any suggestions how to fix this issue?
    Thanks,
    Saravanan

    Hi Experts,
    Did anybody get the solution of this error ,if yes please reply?
    I am getting below error when I am refreshing the current config or creating a new one in LTR
    " Error occurred when selecting from database"
    Thanks for your help,
    Balwant

  • How to create linked server to multiple database on same server?

    Hi Experts
    I want to create linked server to multiple databases on the same server.
    I have 2 database servers (ServerA and ServerB) and want to create linked server on ServerB to link multiple databases on ServerA).
    I have admin right on ServerB.
    I don't have admin right on ServerA but have different accounts to access on each databases on ServerA.
    After I created one linked server object to a database, I cannot create another linked server object for another database as it has already used the server name which is ServerA.
    Please advise.
    Thanks.

    EXEC sp_addlinkedserver 'ServerADB1', '', 'SQLNCLI', 'ServerA', @catalog = 'DB1'
    EXEC sp_addlinkedserver 'ServerADB2', '', 'SQLNCLI', 'ServerA', @catalog = 'DB2'
    etc.
    Please look up the details for sp_addlinkedserver as I typed this from memory.
    I can certainly see a point in having one linked server per database, as then you don't have to hardcode the database name in the queries, and the linked-server definitions can be changed if the database name changes.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Hypertext links are not always preserved from Word to PDF, using Aperçu or Adobe, depending on OS 10 or Lion. Why? This generally works perfectly in Windows. Why are Apple and Adobe unable to correctly handle links when converting from Word to PDF?

    Hypertext links are not always preserved from Word to PDF, using Aperçu or Adobe, depending on OS 10 or Lion. Why? This generally works perfectly in Windows. Why are Apple and Adobe unable to correctly handle links when converting from Word to PDF?
    Depending on the system version, and Office Word version:
    - a pure URL link starting with http or even www sometimes works in PDF, either produced by Aperçu or Adobe, sometimes does not work;
    - other kind of links where the text under display is not a URL, never work!
    I like everything with Apple computers and software, except PDF generation. Output files are usually bigger in size, and no better quality, than under Windows. Furthermore, it is weird that something as common as hyperlinks does not work correctly!
    I related this question with Mac OS X Snow Leopard, but the problem is still there with Mac OS Lion.
    This problem seems to have been around for years, without any proper solution from Apple and/or Adobe! To me, this is very embarrassing!

    Greetings NoNameGiven,
    If I understand the problem correctly (I’m not sure I do) you would prefer ‘iii’ to be read as “eye eye eye” rather than “three”? The alt text property is the only way that I know of to make this happen. Hope this helps.
    a ‘C’ student

  • How can I enable the ability to create links when editing site text in BC?

    I am about to launch my first BC site for a client. I built the site using Muse. The client needs to update text and pics on their own using BC, which is fine, but when editing text, they are unable to create a link to another page. How can I enable the ability to create links when editing site text in BC? I can apparently do this in this post, but I don't see a way to do this for their site.

    Grid control should be used if you have multiple dbs to manage.
    But if you still want to install dbconsole, you can use dbca as already mentioned. it's much easier to do that using dbca.
    With the manual method, you create the repository via emca -repos create.
    Then you configure it using emca -config dbcontrol db. This will ask for sys passwords, ports setting etc...

  • Problem in retreiving from database and viewing it in browser--urgent

    hai,
    i have develped an application using swings where the mails received from client and reply posted will be pasted in JEditorPane. all the mails,query and reply will be stored in database.
    then iam retrieving the mails from database and displaying it in browser using table data.(Just like forum). Iam using encodehtmltag function to omit the html tags that r present in the mail data.
    when i display it in browser it extends a page horizontically. how to avoid this. how to word wrap. one of my friend asked me to set number of character to be displayed per line. i did that. but problem is i could see the word break . i have set 90 characters to be displayed per line. i dont want to break the word. for eg., if the end string of a line is regarding it is displayed like this---reg and then arding in next line. how to avoid this.
    please help me iam breaking my head with this for past few days.

    If the field is a Date in your database, you can use the ResultSet.getDate() method, which will return a java.sql.Date (which extends java.util.Date).
    You can then use SimpleDateFormat to format it the way you like.
    See the API doc for more details.

  • How to create links to and from Facebook

    There is a need to provide links to and  from Facebook
    How does one go about this?

    Create a text or image hyperlink on your web page or use one of the buttons...
    http://www.iwebformusicians.com/Search-Engine-Optimization/Facebook-Button.html
    Copy a text hyperlink to your site and paste it into Facebook.

  • How can I create xml file automatically from database

    Hi,
    Can I create a site map drom database.There is table for storing menu details.Is it possible to create an xml file corresponding to a query.
    How can i configure root menu.xml to incllude this xml file.Please help me..
    Thanks

    Is your question pertaining to an answer regarding JDeveloper, or you just want an XML file? If XML, have you considered looking at the Oracle db XML DB feature set?
    CM.

  • Time changes when retrived from Database.

    I insert the time in a string format to the database (dd-MM-yyyy hh:mm:ss). I retrive the string from database & parse it to date using .parse(string) function. But the date retrived is not the date present in database.
    Database value is 15/09/2001 01:30:30
    & the retrived value is 21-02-0021 01:30:30
    How do i set the time difference !!!

    Your .parse(string) is for some reason assuming that your date is in yy/mm/dd format. It takes day 2001 of month 9 in year 15 and normalizes that to be day 21 of month 2 in year 21. You haven't said what you are using to parse the string, but if it's a SimpleDateFormat then you need to review how you are setting it up.

  • Eurosign not displayed correctly when picked from database

    Hi ..
    I'm having a problem getting a eurosign stored in an Oracle Database to be displayed correctly in my Crystal Reports 11.5.
    When using the built in (preview) Crystal Viewer, the eurosign is displayed correctly, but when I want to print the report directly to a printer or to export it to pdf the eurosign is displayed as a box?
    It only haapens when i need to pick the eurosign from the database. If I insert in a textbox on the report, it will show correctly.
    Please Help.
    Best regards,
    Jacob

    What is the source of the text stored in the database. I ran into an issue a ways back where someone was copying news articles from a website into their database and the euro symbol would not display correctly (unless the option HTML Text Interpretation was used).
    You might want to do a quick check to see if it is stored as an ascii character using a formula similar to the following;
    asc(mid({database, x, 1}))
    where x = the position of the euro symbol in the string.
    The formula result should be 128.
    Edited by: Graham Cunningham on May 22, 2009 12:20 PM

  • How to create an Xml File From DataBase?

    hi all
    i have two tables from my database :
    VoucherHeader and VoucherItem
     VoucherHeader has 4 fields:
    VoucherHeaderId
    bigint Unchecked
    VoucherNum bigint
    Unchecked
    VoucherDate nvarchar(50)
    Unchecked
    Comment nvarchar(50)
    Unchecked
    VoucherItem has 8 fields :
    VoucherItem bigint
    Unchecked
    VoucherHeaderRef
    bigint Unchecked
    Row bigint
    Unchecked
    Code1 bigint
    Unchecked
    Code2 bigint
    Unchecked
    ItemComment nvarchar(50)
    Unchecked
    Debit bigint
    Unchecked
    Credit bigint
    Unchecked
    and i fill datatable by this codes:
    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.VoucherItemTableAdapter.Fill(Me.DataSet1.VoucherItem)
    Me.VoucherHeaderTableAdapter.Fill(Me.DataSet1.VoucherHeader)
    End Sub
    now i see this result:
    how to send data into an Xml File From DataGridView Header and Item?
    please help me
    thanks all.
    Name of Allah, Most Gracious, Most Merciful and He created the human

    One instruction.  But you do it from the dataset, not the DataGridView
    Me.DataSet1.WriteXml(FILENAME)
    There is a WriteXML method for a DataTable but it gives errors.  Since you dataset has two tables save bot into the same xml file.
    jdweng

  • Messages: Broken links when sending from Mac to iOS

    If I copy a link from Safari (right-click > Copy link) and send it with Messages on Mac it remains a clickable link with a link text (in the chat window).
    The problem is if the recipient uses Messages on iOS he will only see the link text and cannot click on the link.
    Is there a solution to this annoying bug?
    The workaround I use is:
    Copy the link from the clipboard into the chat input box. BEFORE sending rightclick on the link > "Copy link" and then insert from the clipboard again. This way you get the URL of the link which is always clickable (on Mac AND iOS).

    Hi,
    Over the years the various messaging services that there are have all done things related to sending Links with words as Hyperlinks.
    The AIM service in particular had a very bad time with people putting malicious code in the link instead of just the URL.
    The matter can be confused when some URLs are very long such as News websites and the like.
    I use the same workaround as you (Send plain text URLs)
    9:26 pm      Monday; January 6, 2014
      iMac 2.5Ghz 5i 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Avoid using DB link when extracting from Oracle in OWB map

    if i define a db table as a source to extract data in my OWB mappings, it will generate PLSQL code which utilises a DBlink to get access to the table.
    my question is, if my source table is in the same schema as my data warehouse runtime schema, can i tell OWB to avoid using a dblink ?!

    Hi Duncan,
    Yes you can. What you will need to do is configure the mapping, which allows you to specify physical characteristics of a mapping. So it allows you to specify where or better how to access and object in a mapping. By default it gets the database link associated with the module it is sourced from.
    To change this, in the module editor highlight your mapping. Click configure, and look at "sources and targets". Open this node and find your source table (or view). Open this node and deselect the "database link".
    Should your table be in a different schema but in the same instance, you can specify a schema qualifier. You can also combine schema and dblink to point to a different instance and schema. If you specify the schema be sure to specify this in the correct case. OWB double quotes to preserve case, so use upper case in the most common scenario.
    Hope this helps,
    Jean-Pierre

  • Keynote refuses to link when hyperlinking from text to keynote file

    I can get hyperlinks from shapes to link, but text links won't link. Suggestions?

    The linking should be the same. Are you able to even add a hyperlink to the text or does the hyperlink just not work when you play it back? If you are able to highlight the text and add the hyperlink, does it underline the text afterwards?

Maybe you are looking for