Re: Text into a url
| From: | daniel at electroteque dot org | Date: | Sun, 14 Sep 2003 01:39:10 +0000 |
| Subject: | Re: Text into a url | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-162538@lists.php.net to get a copy of this message | ||
$query = "SELECT name,url FROM clubs WHERE url>'' ORDER BY name";
??
could it not be
$query = "SELECT name,url FROM clubs WHERE url !="" ORDER BY name";
> Hi
> I am havening a problem retrieving url from a mysql database. I have
> the url's stored as text and am using the following code to retrieve
> them
>
>
> $query = "SELECT name,url FROM clubs WHERE url>'' ORDER BY name";
>
> $result = @mysql_query($query) or die ("Query failed");
>
> if (mysql_num_rows($result) == 0) {
>
> print "No Club Links Found.";
>
> } else {
>
> while ($row = mysql_fetch_assoc($result)) {
>
> print $row["name"] . "<A HREF=
> ".$row['url'].">";
>
>
> This seems to work except the url refers to the previous name on the
> list produced with the first name as a blank url.
> Can anybody help
>
> Thanks
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php