hey diego!
thanks a lot, but i must admit that i dont understand how that would help me? im not sure if you understood me? i dont know english very good but ill try to explain it again...
so, i have table with two columns: title_1 and title_2.
on my index.php page i have a form that looks like this:
<form action=searchform.php method=GET>
<input name="pojam" type="text" class="INPUT" size=25>
<select name="kategorija" class="INPUT">
<option value="artist_1">bendu</option>
<option value="title_1">albumu</option>
<option value="price_kn">cijeni</option>
</select>
<input type=submit class="BUTTON" value="GO!">
</form>
now, when somebody want to search for title he will select albumu option. in my case search looks only in title_1 column but i want it to look in title_1 and title_2 columns.
thats right that my query at the end must look like this:
SELECT * FROM mcs WHERE title_1 LIKE '%$pojam%' OR title_2 LIKE '%$pojam%'
but you see... i cant put in query just title_1 and title_2!!! what if somebody wants to search for artist? then my query must look like this:
SELECT * FROM mcs WHERE artist_1 LIKE '%$pojam%' OR artist_2 LIKE '%$pojam%'
so, my conclusion is this:
instead of title_1 and title_2 or artist_1 and artist_2 or whatever, in my query MUST be $kategorija.
ok, if this is correct then i think that the problem is in that form on index.php page. is it??? i think that i have to tell to the form to search in more that one column... how to do that? oh my god...
THANKS!