Page 1 of 1

Read URL from MySql as a variable

Posted: Sat Aug 16, 2008 10:09 am
by okelly
Hello folks

One of the tables in mysql database contains a listing of urls of rss feeds . (example "http://feedburner.com/rss/rssfeed.xml")
my script below is attempting to read the url from the rssfeeds table and insert in into the $url variable and then pass it to the echo RSS_Display command.
The result should be that the feed content is displayed on screen, but it's returning no content (php5, mySql, Apache2.2.9, Win XP)

Any ideas?

Thanks
Conor

Code: Select all

 
  <?php
    require_once("../rss/rsslib.php");
    $result = mysql_query("SELECT rssfeeds.url FROM rssfeeds WHERE feedID='1' ",$dblink);
    $url = mysql_fetch_assoc($result,0,"url");
    echo RSS_Display($url, 10);
    ?>
 

Re: Read URL from MySql as a variable

Posted: Sat Aug 16, 2008 11:57 am
by okelly
ok..figured it out using the syntax below..thnx

Code: Select all

 
    $url = mysql_result($result,0,"url");