View Single Post
Old 01-15-2008, 04:00 PM   #5 (permalink)
Alan @ CIT
Member of the Month
The Frequenter
Member of the Month Top Contributor 
 
Alan @ CIT's Avatar
 
Join Date: Apr 2005
Location: South UK
Posts: 483
Thanks: 51
Alan @ CIT is on a distinguished road
Default

Edit: Dam my slow typing - Salathe beat me to it

Ok, so that means that $mas2 = false - when in reality, you where expecting it to contain an array (the rows from your query).

As such, it's probably a good guess that your query:

PHP Code:
"select * from tuto where id='$mas[tuto_id]'" 
Is not returning any results. Looking at your query and your debugging results posted above, I can see that it's the "..where id='$mas[tuto_id]'" that is the problem.

If you take another look at your first var_dump() results, you will see that your query is only returning ['rate'] - which in this case equals 5. As such, $mas['tuto_id'] doesn't exist as your query doesn't return it.

I would recommend changing your first query so that it fetches tuto_id as well. This should resolve your problem.

Just remember in future, if in doubt - stick var_dump() statements all over your code until you track down the problem

Alan.
Send a message via MSN to Alan @ CIT
Alan @ CIT is offline  
Reply With Quote