Wuu Posted February 23, 2008 Report Share Posted February 23, 2008 $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 More sharing options...
Pentiums Posted February 23, 2008 Report Share Posted February 23, 2008 $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 More sharing options...
Wuu Posted February 23, 2008 Author Report Share Posted February 23, 2008 Lūdzu nevajag taisīt muļķīgas QUOTEs ne nestrādā :( Link to comment Share on other sites More sharing options...
Wuu Posted February 23, 2008 Author Report Share Posted February 23, 2008 (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 February 23, 2008 by Wuu Link to comment Share on other sites More sharing options...
bubu Posted February 23, 2008 Report Share Posted February 23, 2008 Vajag ar echo izvadīt ārā stringu, ko padod mysql_query fjai, un to pamēģināt konsolē. Link to comment Share on other sites More sharing options...
Wuu Posted February 23, 2008 Author Report Share Posted February 23, 2008 Lūdzu nevajag taisīt muļķīgas QUOTEs Bet es jau tā arī izdarīju :) Link to comment Share on other sites More sharing options...
bubu Posted February 23, 2008 Report Share Posted February 23, 2008 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. Link to comment Share on other sites More sharing options...
Wuu Posted February 23, 2008 Author Report Share Posted February 23, 2008 Aizgāja errors bija citā rindā nevis kur es rakņājos! Lūdzu nevajag taisīt muļķīgas QUOTEs <-- wtf? Link to comment Share on other sites More sharing options...
Aleksejs Posted February 23, 2008 Report Share Posted February 23, 2008 Iepriekšējā postā rakstīto nav jācitē! Link to comment Share on other sites More sharing options...
Recommended Posts