barkster Posted February 28, 2006 Share Posted February 28, 2006 I'm trying to do this query below using a the LIKE command but is not working for me which I assume if the word Smith shows up in the persons last name it will give me a result but it isn't. Also I'm using Dreamweaver for this, both queries work when I run from Navicat but the first does not in dreamweaver? SELECT RecFirstName, RecLastNameFROM RecUsersWHERE RecLastName LIKE '%Smith%'Results = 0But if I do this it works??SELECT RecFirstName, RecLastNameFROM RecUsersWHERE RecLastName LIKE 'Smith%'Results 2 rowsKim SmithJohn SmithAny ideas on why this isn't working? Link to comment https://forums.phpfreaks.com/topic/3761-simple-query-not-working/ Share on other sites More sharing options...
fenway Posted February 28, 2006 Share Posted February 28, 2006 Sounds like Dreamweaver is doing something to leading percentage signs -- I have no idea. Both queries work in SQL, so it's clearly a Dreamweaver issue. Link to comment https://forums.phpfreaks.com/topic/3761-simple-query-not-working/#findComment-13104 Share on other sites More sharing options...
barkster Posted February 28, 2006 Author Share Posted February 28, 2006 yeah, if I run the page I get results for both but when I'm testing from Dreamweaver it doesn't work. I'm posting on dreamweaver group now. Thanks Link to comment https://forums.phpfreaks.com/topic/3761-simple-query-not-working/#findComment-13106 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.