View Single Post
  #13 (permalink)  
Old 27-02-2008, 23:08
DavidAllen's Avatar
DavidAllen DavidAllen is offline
Premium Member
 
Join Date: Jan 2007
Location: Amersham
Posts: 340
Send a message via MSN to DavidAllen Send a message via Skype™ to DavidAllen
Default

that line should be ok now
that has put the SQL Server into a variable called recent_sql
Now need to do the actual call
so
$result=mysql_query($recent_sql);;
should give the data from the query into an object called $result
to get from the $result object holing all the data to individual rows we need the next line
$row = mysql_fetch_row($result);
which leaves us pointing at the first row and can access the fields in that row like :
echo $row['price'];
Only difference is that the $link_id optional paremeter has been removed from the mysql_query call - I use $link_id as the return from the module that does the database connection - you don't need it
__________________
David Allen - www.serina.co.uk
Reply With Quote