[thelist] sql query php layout

Andrew Maynes andrew at humanbehaviour.co.uk
Mon Nov 25 10:34:01 CST 2002


Thanks Rudy, the cream is working a little bit :)

So far I am not making too muck progress on this :( the query I have is this:

// Send the Query to the Server, to get the list of books
if (!($result = mysql_db_query($DB,"SELECT * FROM book_shop")))
{
   DisplayErrMsg(sprintf("internal error %d:%s\n",
      mysql_errno(), mysql_error()));
   return 0 ;
}

// Display the Items
while(($row = mysql_fetch_array($result)))
{

followed by this:

<?php
   echo $row["title"];
   echo "<BR>";
   echo $row["image"];
   echo "<BR>";
   echo $row["author"];
   echo "<BR>";

?>


which is just spitting the records out in a nice long list!

Andrew



More information about the thelist mailing list