CRO8 Posted April 14, 2004 Posted April 14, 2004 Hello All- I'm new to this forum. Looks great. Me and my client are trying to enter some info into his dbase using phpmyadmin in our control panel and getting an error message. What can be wrong in this piece of code? >INSERT INTO OFFER(OID,MID,OFFER_URL,B_DATE,E_DATE)VALUES(1,1,"<b><a href="" "" target="" "">Hot Deal <br></a></b>This is an Apparel Link",curdate(),curdate()); Looks like there may be a problem with the & Quote when entered into phpmyadmin, we get the following error message: Error SQL-query : INSERT INTO OFFER( OID, MID, OFFER_URL, B_DATE, E_DATE ) VALUES ( 1, 1 , & quot MySQL said: #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 1 If you need more info, please I will be happy to provide . . . Thanks! Quote
btrfld Posted April 14, 2004 Posted April 14, 2004 Hi CRO8. It looks as if you need quotes around the value that goes into the OFFER_URL field: INSERT INTO OFFER(OID,MID,OFFER_URL,B_DATE,E_DATE)VALUES(1,1,'"<b><a href="" "" target="" "">Hot Deal <br></a></b>This is an Apparel Link"',curdate(),curdate()); so it gets seen as a literal value. Otherwise the parser gets confused. I've underlined them in the above, though you still have to look pretty hard to see them. Hope this helps Jim Quote
CRO8 Posted April 14, 2004 Author Posted April 14, 2004 oh cool, thanks so much for underlining them. very helpful. thanks again ! Quote
TCH-Bruce Posted April 14, 2004 Posted April 14, 2004 <_ welcome to the family cro8 src="%7B___base_url___%7D/uploads/emoticons/default_laugh.png" alt=":lol:"> Anymore questions just ask. Someone will be sure to help. Quote
TCH-Don Posted April 14, 2004 Posted April 14, 2004 Welcome to the Family CRO8 and your new home! We really are like family here. So if you need anything, just ask your new family! We love to help Quote
CRO8 Posted April 16, 2004 Author Posted April 16, 2004 wow guys thanks so much I really do feel at home here. cool My home is ozone asylum but I have never seen a board like this before. very cool. Thanks for the welcome! CRO8 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.