stencilz Posted January 31, 2007 Report Posted January 31, 2007 par cik nevaru iepostēt forumā Draza rakstīšu šeit. vai nu tiešām man ir atmiņā kā zivij :D mysql_query("INSERT INTO priv_msg (sub, text, from, to, time) VALUES ('".$_POST['subject']."', '".$_POST['text']."', '".$_SESSION['id']."', '".$_POST['to']."', NOW())"); kur man šeit ir kļūda? 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 'from, to, time) VALUES ('ububuipbui', 'iugvolhvbi;jbuiguyvuyfduk
andrisp Posted January 31, 2007 Report Posted January 31, 2007 echo "INSERT INTO priv_msg (sub, text, from, to, time) VALUES ('".$_POST['subject']."', '".$_POST['text']."', '".$_SESSION['id']."', '".$_POST['to']."', NOW())"; Un paskaties pēc kā izskatās.
stencilz Posted January 31, 2007 Author Report Posted January 31, 2007 (edited) it kā viss labi INSERT INTO priv_msg (sub, text, from, to, time) VALUES ('iubvuvcuyv', 'iuboivuvugvcuyvoyv', '1', '2', NOW()) Edited January 31, 2007 by stencilz
andrisp Posted January 31, 2007 Report Posted January 31, 2007 Nē, tām tur jābūt. Ja nebūs, tad php metīs notices vai warningus ārā par to, ka nav atrastas konstantes.
stencilz Posted January 31, 2007 Author Report Posted January 31, 2007 pie vainas nevar būt ka man pirms sub ir id ar aut_increment?
stencilz Posted January 31, 2007 Author Report Posted January 31, 2007 nu jā re kur ir INSERT INTO priv_msg (sub, text, from, to, time) VALUES ('iubvuvcuyv', 'iuboivuvugvcuyvoyv', '1', '2', NOW())
stencilz Posted January 31, 2007 Author Report Posted January 31, 2007 paldies, šādi viss aizgāja: mysql_query("INSERT INTO `priv_msg` (`sub`,`text`,`from`,`to`,`time`) VALUES ('".$_POST['subject']."', '".$_POST['text']."', '".$_SESSION['id']."', '".$_POST['to']."', NOW())");
Grey_Wolf Posted January 31, 2007 Report Posted January 31, 2007 PheliX--> ne tikai FROM arii TO... stencilz --> paskaties kaadi vardi ir rezerveetie + kadus vardus nav ieteicams lietot.... teiksim ja lietosi password ; datatime utt. tad var gadiities situaacija ka DB nogljuko.... taapeec no tiem iesaku izvairiities....
Recommended Posts