millers Posted May 5, 2008 Report Share Posted May 5, 2008 Man ir jautajums kur man ir kada kluda sini koda jo vinjs man nepievieno loginu paroli why? rekur code http://paste.php.lv/7304 kur tur ir vaina ? Link to comment Share on other sites More sharing options...
werd Posted May 5, 2008 Report Share Posted May 5, 2008 (edited) insert sintakse 17.rindiņā: Tu nenorādi, kādās tabulas rindās vērtības pievienot tabulā lietotāji. mysql_query("INSERT INTO lietotaji VALUE ('0', ".$_POST['logins']." ".$_POST['parole'].")") or die ("Neizdevas pievienot"); Vajag uz: mysql_query("INSERT INTO lietotaji (login, parole) VALUES ('0', ".$_POST['logins']." ".$_POST['parole'].")") or die ("Neizdevas pievienot"); Edit: bubu>>pārskatījos Edited May 5, 2008 by phpjanis Link to comment Share on other sites More sharing options...
bubu Posted May 5, 2008 Report Share Posted May 5, 2008 Tev die("Neizdevas pievienot") vietā vajag rakstīt: die(mysql_error()). Tad arī redzēsi kļūdu. Un nekad, nekad, nekad neizmanto plikus GET/POST/COOKIE datus mysql kverijos kā stringus. Tavu lapu "uzlaisīs" ātri vien. Edit: phpjanis: tur ir norādītas divas, nevis trīs kolonnas ;) Link to comment Share on other sites More sharing options...
millers Posted May 5, 2008 Author Report Share Posted May 5, 2008 vinjs izmeta kko sadu 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 'gsdg)' at line 1 Link to comment Share on other sites More sharing options...
mounkuls Posted May 5, 2008 Report Share Posted May 5, 2008 (edited) bubu, nav īsti skaidrs vai trīs lauki mysql_query("INSERT INTO lietotaji VALUE ('0', ".$_POST['logins']." ".$_POST['parole'].")") Lai gan visdrīzāk trūkst komats starp login un parole VALUES. Un jā, ja nenorāda laukus, tad VALUES, ne VALUE. EDIT: johaidi! atvainojos atkal, bubu! pašam sajuka ātrumā lasot. Edited May 5, 2008 by mounkuls Link to comment Share on other sites More sharing options...
millers Posted May 5, 2008 Author Report Share Posted May 5, 2008 ieliku komatu starp .$_POST['logins']." ".$_POST['parole']. uzmetas errors Unknown column 'gsdgds' in 'field list' Link to comment Share on other sites More sharing options...
andrisp Posted May 5, 2008 Report Share Posted May 5, 2008 stringi iekš kverija ir jāliek iekš pēdiņām. pamēģini izdrukāt to savu kveriju un redzēsi kur vaina. Link to comment Share on other sites More sharing options...
Recommended Posts