|
Posted by Tom Rogers on 10/03/73 11:08
Hi,
Wednesday, February 16, 2005, 9:48:41 PM, you wrote:
rac> Is there a way to retrieve and display a single value (customer number) from
rac> a database and display it without using
rac> while ($row = mysql_fetch_array) ($result)){
rac> I have a value I know the query will only ever return a single value. I want
rac> to get it from the database and convert it to a variable so I can use it on
rac> my php page.
rac> Thanks in advance,
rac> Ross
You can just drop the while
$row = mysql_fetch_array($result);
if you only have one row and one column you can do:
$var = mysql_result($result,0,0);
--
regards,
Tom
Navigation:
[Reply to this message]
|