Jump to content
php.lv forumi

Kaut kas nesanaak


Snukzz

Recommended Posts

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

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

ņē 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

×
×
  • Create New...