Jocka Posted November 16, 2006 Share Posted November 16, 2006 I have php5 and the latest mysql (forget) on my test server here at home. For some reason I CANNOT get simple queries to work. For example, this used to work just fine:[b]SELECT * FROM table WHERE this='that'[/b]But for whatever reason that SIMPLE query doesn't work. I have to do this to make it work:[b]SELECT * FROM table WHERE this LIKE '%that%'[/b]Which as I understand it can be a pretty bad security risk. Whats going on with this? I tried to find a way to make it work but it seems like there is no solution other than "like" .. Link to comment https://forums.phpfreaks.com/topic/27404-mysql-problem-or-php-problem/ Share on other sites More sharing options...
fenway Posted November 16, 2006 Share Posted November 16, 2006 Those mean different things -- the former means "find rows where the column named 'this' is equal to the string 'that'"; the latter means "find rows where the column named 'this' contains the string 'that'". Link to comment https://forums.phpfreaks.com/topic/27404-mysql-problem-or-php-problem/#findComment-125624 Share on other sites More sharing options...
Jocka Posted November 17, 2006 Author Share Posted November 17, 2006 Yea. I know. What I'm saying is that even if it DOES = 'that' it won't load it. I have to use the "LIKE" statement for it to work. Link to comment https://forums.phpfreaks.com/topic/27404-mysql-problem-or-php-problem/#findComment-125993 Share on other sites More sharing options...
fenway Posted November 17, 2006 Share Posted November 17, 2006 [quote author=Jocka link=topic=115139.msg469412#msg469412 date=1163737267]Yea. I know. What I'm saying is that even if it DOES = 'that' it won't load it. I have to use the "LIKE" statement for it to work.[/quote]Now that doesn't make much sense... can you post a dump of your table (or at least the relevant rows and create) so I can test this? Link to comment https://forums.phpfreaks.com/topic/27404-mysql-problem-or-php-problem/#findComment-126067 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.