Re: returning ONE field from a mySQL database, beginner
| From: | Julie Meloni | Date: | Wed, 12 Jul 2000 15:04:20 +0000 |
| Subject: | Re: returning ONE field from a mySQL database, beginner | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-6149@lists.php.net to get a copy of this message | ||
> $query = "SELECT Description FROM pictures WHERE Name = '$pic'";
> $description = MYSQL_QUERY($query);
> print "$description</center>";
>
$result = mysql_query($query) or die(mysql_error());
$description = mysql_result($result, 0, "Description");
echo "$description";
+------------------------------------------------+
| Julie Meloni (jcm@i2ii.com) |
| Tech. Director, i2i Interactive (www.i2ii.com) |
| |
| "PHP Essentials" & "PHP Fast & Easy" |
| http://www.thickbook.com/ |
+------------------------------------------------+