I want to edit the file search.php so the search will cover the columns descr, location and binnum
I tried to edit the file and change the query, but discovered that when i did that the search results also included results from other users than the user currently logged in.
Very strange, and not what i intended so i changed back to the original search.php file on my serverinstallation: https://inventorylist.no
Could you check why that happened?
Morten
It would help if you give me the entire search.php code below. However, I would think that it is because of your query. Look at this code below.
$query = "SELECT * FROM merch WHERE user='$uid' AND lower(nameMerch) LIKE '%$srh%' ORDER BY id ASC";
Now if I wanted to use the descr instead of nameMerch I would write it like this.
$query = "SELECT * FROM merch WHERE user='$uid' AND descr LIKE '%$srh%' ORDER BY id ASC";
If I wanted to include both the nameMerch and descr I would writ it like this.
$query = "SELECT * FROM merch WHERE user='$uid' AND lower(nameMerch) LIKE '%$srh%' OR descr LIKE '%$srh%' ORDER BY id ASC";
Give that a try and let me know what it does for you
Let me know if that works for you and paste the whole file to me if it doesn’t.