Hi all,
I'm having a problem with the following statement:
$sql = "SELECT DISTINCT Users.Username, Users.Firstname, Users.Surname, Settings.Title FROM Users, Settings WHERE Settings.Owner = Users.Username AND Users.Firstname LIKE '%{$query}%' OR Users.Surname LIKE '%{$query}%' OR Users.Username LIKE '%{$query}%' OR Settings.Title LIKE '%{$query}%'";
Basically its a little script thats just searching the database for the variable I pass in. The problem is, I have it running on my development system fine, returns the correct results. The problem is, when I upload it to my web server, the results returned are every possible combination of results as if the WHERE Settings.Owner = Users.Username is not being tested. I don't know if it makes much difference, but my development system runs mysql version 5.1.37 and my web server is running 5.0.89.
Thanks for any help,
Luke