I have a database for my classified ads for our club. I have the structure as follows:
Classified_ID int(11)
Name varchar(40)
Address1 varchar(35)
Address2 text
City varchar(35)
State varchar(3)
ZipCode int(5)
PhoneNumber varchar(12)
Member int(1)
Ad_Type varchar(10)
Subject_Title text
Ad_Content text
Date_Submitted date
Duration int(2)
Active int(1)
adEmail varchar(35) Yes
Now, I have a query to insert into this database, but it fails and I cannot figure out why.
query to insert:
INSERT INTO Classified (‘Name’, ‘Address1’, ‘City’, ‘State’, ‘ZipCode’, ‘adEmail’, ‘PhoneNumber’, ‘Member’, ‘AdType’, ‘Ad_Content’, ‘Date_Submitted’, ‘Duration’, ‘Active’) VALUES (‘richerd’, ‘9876’, here’, ‘WA’, ‘99217’, ‘address@email.com’, ‘508-555-1212’, ‘0’, ‘Wanted’, ’ wanting something’, ‘04-16-2012’, ‘3’, 1)
Failure message:
Data did not get inserted into Participant table - 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 '‘Name’, ‘Address1’, ‘City’, ‘State’, ‘ZipCode’, ‘adEmail’, ‘PhoneNumber’, ‘Membe’ at line 1
Please let me know what I am doing wrong.
Oh, PHP version is 5.2.17 just in case you were going to ask…
E