For Programmers: Free Programming Magazines  


Home > Archive > PHP SQL > April 2004 > Re: weird output from mysql query









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: weird output from mysql query
vornn

2004-04-20, 6:32 pm

You have missed something out!

Here goes:

result = mysql_query("SELECT client_name FROM tbl_clients
WHERE client_id = SLAClient");
total = mysql_num_rows(result);

if(total == 0)
{
echo "There is no upcoming events.";
}
else
{

while (row = mysql_fetch_array(result))
{
ClientName = stripslashes(row['ClientName']);
echo "ClientName";
}


This will output all of the records in the database.

Hope this helps...


:)


'Who are you? Who slips into my robot body and whispers to my
ghost?'

----------------------------------------
The post originated from PHP Freaks:
----------------------------------------
http://www.phpfreaks.com
http://www.phpfreaks.com/forums


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com