Snukzz Posted October 13, 2004 Report Share Posted October 13, 2004 Reku vienc skripc, kurs izvada preces sascirojot peec sub_kategorijas. skripc. Te ir veelviens skripc kuram buutu jaaizvada preces gan peec sub_kategorijas, gan peec brenda. skripc ir te Nesaprotu, kas par vainu, ka nesancee. Kaa lai piespiez otro skriptu sanjemt 2 parametrus - divus ciparus peec kuriem nosancee kverijs? Man kaut kaa nesanaak! :unsure: Link to comment Share on other sites More sharing options...
Snukzz Posted October 13, 2004 Author Report Share Posted October 13, 2004 Klau, kaads zin?.... shitaa var rakstiit..jeb kaa buutu efektiivaak? $list=user_num($_GET['list']); $sub_kat_id=user_num($_GET['skatid']); $res=mysql_query('SELECT nos, art, kat_id, sub_kat_id, id, stock, brends FROM preces WHERE stock = 1 AND sub_kat_id=.$sub_kat_id AND brends='.$list); $res3=mysql_query('SELECT nos, art, kat_id, sub_kat_id, id, stock, brends FROM preces); $res2=mysql_query('SELECT id, nos FROM brendi'); while($row2=mysql_fetch_row($res2), $row3=mysql_fetch_row($res3))........ Link to comment Share on other sites More sharing options...
bubu Posted October 13, 2004 Report Share Posted October 13, 2004 Vai tad tas ir sintaktiski korekti? Link to comment Share on other sites More sharing options...
Venom Posted October 13, 2004 Report Share Posted October 13, 2004 primkārt ievērojam 'SELECT ... _id= .$sub_kat_id AND brends='.$list otrkārt - liekam error_reporting(E_ALL); faila sākumā pēc pirmā <?php vai to pašu izdarām iekš php.ini Link to comment Share on other sites More sharing options...
bubu Posted October 13, 2004 Report Share Posted October 13, 2004 Es vairāk par while nosacījumu domāju... :) Link to comment Share on other sites More sharing options...
Venom Posted October 13, 2004 Report Share Posted October 13, 2004 Es vairāk par while nosacījumu domāju... :) es nostrādāju kā īstens pārseris - apstājos pie pirmās kļūdas :ph34r: Link to comment Share on other sites More sharing options...
bubu Posted October 13, 2004 Report Share Posted October 13, 2004 Tā jau nebija parsēšanas (sintakses) kļūda, bet loģiskā ;) Tādas automātiski nedetektējas. Tu jau kā mysql serveris drīzāk erroru izmeti. hh ;) Link to comment Share on other sites More sharing options...
Venom Posted October 13, 2004 Report Share Posted October 13, 2004 ņē nu 'SELECT nos, art, kat_id, sub_kat_id, id, stock, brends FROM preces WHERE stock = 1 AND sub_kat_id= [nav ielikts līmējošais apostrofs] .$sub_kat_id [nav ielikts .' ] AND brends='.$list ... tā kā tomēr pārseris vien iraid Link to comment Share on other sites More sharing options...
bubu Posted October 13, 2004 Report Share Posted October 13, 2004 Ne tak Venom! No php viedokļa mysql_query prasa string parametru vienu. Un tas tiek arī nodots. A kas iekšā tas php parserim pie kājas! Par to tālāk skatās mysql :) Eh, kasamies mēs te par sīkumiem :D Link to comment Share on other sites More sharing options...
Venom Posted October 13, 2004 Report Share Posted October 13, 2004 ak jā, ieliku coda gabalu VenPadā un iekrāsojās zaļš jau pārāk tālu aizdomājos Link to comment Share on other sites More sharing options...
Snukzz Posted October 18, 2004 Author Report Share Posted October 18, 2004 Mazliet padomaaju - un uztaisiiju - pat straadaa taa kaa vajag. Thanks 4 help! :D Link to comment Share on other sites More sharing options...
Recommended Posts