Jump to content
php.lv forumi

Recommended Posts

Posted

$search = '&& (sname like "%'.$search.'%" || itemname like "%'.$search.'%" || itemtype like "%'.$search.'%")';

and

$result = mysql_query('select * from sphere_market where isnull(buyuid) '.$search.' order by id desc limit '.$order.',10;');

ir vienāds

MySql Error:1064: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 '&& (sname like "%rjj%" || itemname like "%rjj%" || itemtype like "%rjj%") order ' at line 1

kapēc tā? Beigās sanāk šādi kas tur vainas nesaprotu

 

select * from sphere_market where isnull(buyuid) && (sname like "%'.$search.'%" || itemname like "%'.$search.'%" || itemtype like "%'.$search.'%") order by id desc limit '.$order.',10;'

Posted

$search = '&& (sname like "%'.$search.'%" || itemname like "%'.$search.'%" || itemtype like "%'.$search.'%")';

 

nomaini uz

$search = && ('sname like "%'.$search.'%" || itemname like "%'.$search.'%" || itemtype like "%'.$search.'%"');

 

īsti nezinu

Posted (edited)

Tas jau vairs nav nopietni! ierakstot mysql konsulē

select * from sphere_market where isnull(buyuid) && (sname like '%platemail%' || itemname like '%platemail%' || itemtype like '%platemail%') order by id desc limit 10;

 

errora nav!

 

Un php search arī strādā ,bet dod ārā erroru!

Edited by Wuu
Posted

Tas nevar būt. Jo #1 postā tev kverija beigās ir LIMIT x,10; taču #4 postā beigās ir LIMIT 10. Tie ir dažādi kveriji. Kautko nepareizi izdarīji.

×
×
  • Create New...