knowram Posted October 5, 2007 Share Posted October 5, 2007 is there a way to say Select * from Device Where Name doesn't start with A how do you do the doesn't start with part? thanks for the help Link to comment https://forums.phpfreaks.com/topic/72026-solved-mssql-query-with-php/ Share on other sites More sharing options...
corbin Posted October 5, 2007 Share Posted October 5, 2007 NOT LIKE 'A%' Look into the LIKE clause ;p. Link to comment https://forums.phpfreaks.com/topic/72026-solved-mssql-query-with-php/#findComment-362906 Share on other sites More sharing options...
knowram Posted October 5, 2007 Author Share Posted October 5, 2007 Thanks i have still haven't figured out wild cards. Link to comment https://forums.phpfreaks.com/topic/72026-solved-mssql-query-with-php/#findComment-362916 Share on other sites More sharing options...
corbin Posted October 5, 2007 Share Posted October 5, 2007 If you know the cmd style *, then the % is basically the same with SQL. Also, in MSSQL (and maybe MySQL as well), you can use brackets to do choices. For example: A% would be A and then anything else following A. %A would be anything with an A on the end. [ABC]% would be anything that starts with A B or C. Link to comment https://forums.phpfreaks.com/topic/72026-solved-mssql-query-with-php/#findComment-362919 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.