Unix Technical Forum

Can't find the start

This is a discussion on Can't find the start within the MySQL forums, part of the Database Server Software category; --> Hi guys, I've a query built in this way $query = "SELECT * FROM foo WHERE bar REGEXP '$item' ...


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 10:05 AM
=?ISO-8859-1?Q?zano=AE?=
 
Posts: n/a
Default Can't find the start

Hi guys,

I've a query built in this way

$query = "SELECT * FROM foo WHERE bar REGEXP '$item' ORDER BY data DESC
LIMIT 0,100";
$result = mysql_query($query);

It works correctly only if $item is not equal to a value in the DB.
E.G. I've column with the string patrol
If $item is different from patrol which means atrol trol atr and so on,
the query returns all the occurences of patrol.
If $item is patrol no occurrence is found.
I've tried with LIKE, with '%$item%' but without any success.

Any idea?


--
Esti Qatzi
http://zelohim.it upd 20.01.07 ubuntu user #4898

Il Fattucchiero puņ allacciarsi le scarpe con i piedi.


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 04:12 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com