Jump to content
php.lv forumi

Neštim mysql nesaprotu kāpēc!


Wuu

Recommended Posts

$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;'

Link to comment
Share on other sites

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

 

nomaini uz

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

 

īsti nezinu

Link to comment
Share on other sites

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
Link to comment
Share on other sites

×
×
  • Create New...