Mysql: Entering Info Into Dbase Using Phpmyadmin

liunx

Guest
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?<br /><br /><!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->INSERT INTO OFFER(OID,MID,OFFER_URL,B_DATE,E_DATE)VALUES(1,1,"<b><a href=http://www.totalchoicehosting.com/forums/lofiversion/index.php/""                "" target=""      "">Hot Deal <br></a></b>This is an Apparel Link",curdate(),curdate());<!--c2--></div><!--ec2--><br /><br />Looks like there may be a problem with the <b>& Quote</b> when entered into phpmyadmin, we get the following error message:<br /><br />Error<br />SQL-query : <br />INSERT INTO OFFER( OID, MID, OFFER_URL, B_DATE, E_DATE ) <br />VALUES ( 1, 1 , & quot <br />MySQL said: <br />#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 '&quot' at line 1<br /><br />If you need more info, please I will be happy to provide . . . <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><br /><br />Thanks!<!--content-->
Hi CRO8.<br /><br />It looks as if you need quotes around the value that goes into the OFFER_URL field:<br /><!--quoteo--><div class='quotetop'>QUOTE</div><div class='quotemain'><!--quotec-->INSERT INTO OFFER(OID,MID,OFFER_URL,B_DATE,E_DATE)VALUES(1,1,<b><u>'</u></b>"<b><a href=http://www.totalchoicehosting.com/forums/lofiversion/index.php/""                "" target=""      "">Hot Deal <br></a></b>This is an Apparel Link"<b><u>'</u></b>,curdate(),curdate());<!--QuoteEnd--></div><!--QuoteEEnd--><br />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.<br /><br />Hope this helps<br />Jim<!--content-->
oh cool, thanks so much for underlining them. very helpful. thanks again ! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
<img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/kicking.gif" style="vertical-align:middle" emoid=":dance:" border="0" alt="kicking.gif" /> Welcome to the family, CRO8! <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/kicking.gif" style="vertical-align:middle" emoid=":dance:" border="0" alt="kicking.gif" /><br /><br />Anymore questions just ask. Someone will be sure to help.<!--content-->
<img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/kicking.gif" style="vertical-align:middle" emoid=":dance:" border="0" alt="kicking.gif" /> Welcome to the Family CRO8 <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/kicking.gif" style="vertical-align:middle" emoid=":dance:" border="0" alt="kicking.gif" /> <br /><br />and your new home!<br /><br />We really are like family here.<br />So if you need anything,<br />just ask your new family!<br />We love to help <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /><!--content-->
wow guys thanks so much I really do feel at home here. cool <img src="http://www.totalchoicehosting.com/forums/style_emoticons/default/smile.gif" style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> My home is <a href="http://www.ozoneasylum.com" target="_blank">ozone asylum </a> but I have never seen a board like this before. very cool. Thanks for the welcome!<br /><br />CRO8<!--content-->
 
Top