Kurmus Posted December 7, 2010 Report Share Posted December 7, 2010 Sveiciens pašiem labākajiem! Vai kāds nevarētu lūdzu paskaidrot iesācējam, kā izlabot šo kļūdu: The query you are trying to run is invalid Mysql Error Output: 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 2 SQL Query: SELECT * FROM probid_users WHERE user_id= Zemāk daļa no sql faila. Iepriekš jau izsaku milzīgu paldies CREATE TABLE IF NOT EXISTS `probid_users` ( `user_id` int(11) NOT NULL auto_increment, `name` varchar(100) NOT NULL default '', `email` varchar(255) NOT NULL default '', `birthdate` date NOT NULL default '0000-00-00', `address` varchar(100) NOT NULL default '', `city` varchar(50) NOT NULL default '', `state` varchar(100) NOT NULL default '', `country` varchar(100) NOT NULL default '', `zip_code` varchar(30) NOT NULL default '', `phone` varchar(30) NOT NULL default '', `username` varchar(255) NOT NULL default '', `password` varchar(32) NOT NULL default '', `active` tinyint(4) NOT NULL default '0', Quote Link to comment Share on other sites More sharing options...
foxsk8 Posted December 8, 2010 Report Share Posted December 8, 2010 SELECT * FROM `probid_users` WHERE `user_id` = '1' Quote Link to comment Share on other sites More sharing options...
briedis Posted December 8, 2010 Report Share Posted December 8, 2010 Tev ir jāparāda kļūdainais kvērijs :) Quote Link to comment Share on other sites More sharing options...
Kurmus Posted December 8, 2010 Author Report Share Posted December 8, 2010 Tev ir jāparāda kļūdainais kvērijs :) Kas tas tāds? Parādīšu visu ko vajag, tikai palīdziet tikt skaidrībā Quote Link to comment Share on other sites More sharing options...
briedis Posted December 8, 2010 Report Share Posted December 8, 2010 parasti mysql_query("SELECT blablabla šī daļa"); Quote Link to comment Share on other sites More sharing options...
Kurmus Posted December 8, 2010 Author Report Share Posted December 8, 2010 parasti mysql_query("SELECT blablabla šī daļa"); Nu pasaki tā kā galdniekam lai var atrast es neesmu programmētājs (nu galdnieks arī nē) :) tas ir iekš DB vai kur citur jāmeklē ? Quote Link to comment Share on other sites More sharing options...
Kurmus Posted December 8, 2010 Author Report Share Posted December 8, 2010 SQL Query: SELECT * FROM probid_users WHERE user_id= Quote Link to comment Share on other sites More sharing options...
briedis Posted December 8, 2010 Report Share Posted December 8, 2010 nu lūk, te ir kvērijs, kas atlasa lietotājus, kam user_id ir tukšusm. Tur vajadzētu būt vai nu lietotāja ID, vai vispār jāvāc nost tā WHERE user_id= daļa, ja netiek meklēt konkrēti viens lietotājs. Quote Link to comment Share on other sites More sharing options...
Kurmus Posted December 8, 2010 Author Report Share Posted December 8, 2010 tur tiek meklēts konkrēts lietotājs, jo tā ir izsole. Pastāsti lūdzu kā izlabot un kur?? Quote Link to comment Share on other sites More sharing options...
Kurmus Posted December 8, 2010 Author Report Share Posted December 8, 2010 Šādi izskatās pati 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 '' at line 2 SQL Query: SELECT * FROM probid_users WHERE user_id= Quote Link to comment Share on other sites More sharing options...
briedis Posted December 8, 2010 Report Share Posted December 8, 2010 Nu tad padod konkrēta lietotāja id. Tak parādi koda fragmentu, kas tur notiek. Quote Link to comment Share on other sites More sharing options...
Kurmus Posted December 8, 2010 Author Report Share Posted December 8, 2010 Tas ir šo vai es jaucu: -- -- Tabulas struktūra tabulai `probid_users` -- CREATE TABLE IF NOT EXISTS `probid_users` ( `user_id` int(11) NOT NULL auto_increment, `name` varchar(100) NOT NULL default '', `email` varchar(255) NOT NULL default '', `birthdate` date NOT NULL default '0000-00-00', `address` varchar(100) NOT NULL default '', `city` varchar(50) NOT NULL default '', Quote Link to comment Share on other sites More sharing options...
Kurmus Posted December 8, 2010 Author Report Share Posted December 8, 2010 Saki kas no manis vajadzīgs? Tieku klāt visam Quote Link to comment Share on other sites More sharing options...
Mr.Key Posted December 8, 2010 Report Share Posted December 8, 2010 Zobus arī pats labo? Iedod kādam profesionālim, lai salabo tavu lapu. Quote Link to comment Share on other sites More sharing options...
daGrevis Posted December 8, 2010 Report Share Posted December 8, 2010 Ticu, ka lapa ir uz PHP. Darot kādu darbību, piemēram pērkot preci, izpildās skripts, kurš saucās, piemēram, foo.php. Tātad Jānīts pērk preci un izpildās skripts foo.php. Pašā foo.php, ja to atver ar failu editor'u, piemēram, Notepad++, atverās kods. Atrodi tur, visticamāk, funkciju mysql_query()! Iekš funkcijas, t.i., starp iekavām būs SQL kods, kurš veic darbību ar datubāzi. Ta kā SQL kods nav kaut kā pareizs, tiek parādīts error's. Nu Es vismaz tā domāju... =) Quote Link to comment Share on other sites More sharing options...
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.