Jump to content

selecting from mysql where text = 'some_text' help pls


UnknownPlayer

Recommended Posts

How can i use

$query = "SELECT * FROM klanovi WHERE naziv = '{$trazi}' OR tag =  '{$trazi}'";

but i need to search from base where that $trazi is contained in naziv or tag, i mean like wildacards?

And how can i search that text but no matter of lowercase or uppercase ?

$trazi = strtolower($trazi); 
$trazi = preg_replace('/\s+/', '|', $trazi);

 

then

 

lower(naziv) REGEXP '$trazi'

 

these are a few pointers as to the functions you will need to use, REGEXP is more forgiving and the preg_replace with OR lets it seach within

 

www.wigpip.com.au

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.