I found back ups of websites I did around 3-4 years ago. I'm only just getting back into coding etc and wondered if someone could help me.
I noticed that I now need to use ` instead of nothing or a ', for example creating a database from an old SQL dump just didnt work. I had to go through and add a ` around the table name and row names like below:
From:
To:
After some editing I finally got the site up but I'm receiving the following error:
Relating to the following:
While I understand I could re-write everything I'm sure I could install an older version of MySQL or something to get this working? Anyone?
I noticed that I now need to use ` instead of nothing or a ', for example creating a database from an old SQL dump just didnt work. I had to go through and add a ` around the table name and row names like below:
From:
Code:
CREATE TABLE leagues (
l_id int(11) DEFAULT '0' NOT NULL auto_increment,
l_name varchar(15) DEFAULT '0' NOT NULL ,
l_url varchar(100) DEFAULT '0' NOT NULL ,
PRIMARY KEY (l_id)
);
To:
Code:
CREATE TABLE `leagues` (
`l_id` INT( 11 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`l_name` VARCHAR( 15 ) NOT NULL ,
`l_url` VARCHAR( 100 ) NOT NULL
) TYPE = MYISAM ;
After some editing I finally got the site up but I'm receiving the following error:
Error(news_sql) : 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 1
Relating to the following:
Code:
$news_sql = mysql_query( "SELECT * FROM news WHERE n_id = $p_id" )
or die( "Error(news_sql) : " . mysql_error()
While I understand I could re-write everything I'm sure I could install an older version of MySQL or something to get this working? Anyone?
Last edited: