![]() |
the reate code douesnt work SOS plz
why this code douesnt work !!!!!!!!
PHP Code:
and it gives error => Database error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE `id`='5'' at line 1 |
From what I see, your tables are set wrongly for rating tutorials. What you'd want is a new table like this:
sql Code:
Then you'd insert the rating: sql Code:
You can get a rating by a subquery, like so: sql Code:
Understand that I haven't tested this so I might have made a mistake, but this should work for you. :-) |
thanks but see the error =>
Database error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '3)' at line 1 |
webtuto> An INSERT statement cannot use a WHERE clause. You either perform an INSERT and it inserts data (imagine that) or you perform an UPDATE where you can define columns to update WHERE some condition is met.
MySQL Manual : SQL Statement Syntax : INSERT syntax | UPDATE syntax Also, please read the MySQL Tutorial. SQLZoo is also a good reference. |
thanks i solve the problem
|
| All times are GMT. The time now is 11:25 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0