plz help me here
View Single Post
01-15-2008, 04:00 PM
Alan @ CIT
Member of the Month
Join Date: Apr 2005
Location: South UK
: 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:
"select * from tuto where 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 @ CIT
View Public Profile
Send a private message to Alan @ CIT
Find More Posts by Alan @ CIT