|I am getting this error in MySQL|
| 7:40 am on May 22, 2012 (gmt 0)|
#1064 - 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 ')' at line 4
CREATE TABLE motion
| 7:49 am on May 22, 2012 (gmt 0)|
I fixed the above problem but now i m getting another 1:
#1064 - 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 'Database ( img char(100), img2 char(100), img3 char(100), url char(100), url2 ch' at line 1
CREATE TABLE Movie Database
| 7:50 am on May 22, 2012 (gmt 0)|
I fixed that error also thanks :)
| 4:50 pm on May 22, 2012 (gmt 0)|
Yeah MOVIE DATABASE has spaces, without the word movie, DATABASE is a reserved word, in both cases it requires backticks . . . .
Whoah there cowboy. :-) You are starting off on the wrong foot. You're creating a database that limits to 3. What happens if you want 4? Even if you don't, this makes for a wide table and it's pretty inefficient. Also char is probably not the right type (is's just a-z,) you probably want varchar.
You should REALLY do this as a relational table. Look at this example:
You can have an unlimited number of movie entries (which you can limit with your programming.) It's not all that complicated either . . .
select users.fname,users.lname,movies.moviename,movies.url,movies.img from users,movies where users.id=movies.userid order by moviename limit 5;
Back up and make sure you're building your house on a solid foundation, it's not so easy to fix these things later, especially if you build a lot of programming on top of it.