View Single Post
Old 10-05-2007, 05:54   #4 (permalink)
Naatan
Web Developer
 
Naatan's Avatar
 
Join Date: Jan 2007
Location: Brussels
Posts: 214
Send a message via MSN to Naatan
I've never used list() in such a manner, so I don't know for sure if it would work, but I have my doubts, try the following:

PHP Code:
$query ="Select cl_category_id FROM cl_categories";
$result mysql_query($query);
while (
$cat mysql_fetch_array($resultMYSQL_NUM)) {
  echo 
$cat['cl_category_id'];


and see if that works for you.

note that instead of $type you use $cat['cl_category_id'] - I would recommend always doing mysql queries like this as if you were to change something in your database you wouldn't have to adjust all of your php code

Also try debugging, start with a single while loop for the categories and see if it prints out all the rows, then insert the other while loop inside and see if they work together nicely.
  Reply With Quote