whelpton Posted March 20, 2009 Share Posted March 20, 2009 Hi everyone, Is there a way of modifying this, or using something similar, that will enable me to select users from the mysql database with the letter 'v'? <?php include '/home/alport/public_html/shared/connect.php'; $query = "SELECT * FROM Users ORDER BY Username ASC"; $result = @mysql_query($query); if ($result){ while ($row = mysql_fetch_array($result, MYSQL_ASSOC)){ Thanks Link to comment https://forums.phpfreaks.com/topic/150384-picking-out-different-letters-from-mysql/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 20, 2009 Share Posted March 20, 2009 http://w3schools.com/sql/sql_like.asp Link to comment https://forums.phpfreaks.com/topic/150384-picking-out-different-letters-from-mysql/#findComment-789757 Share on other sites More sharing options...
Maq Posted March 20, 2009 Share Posted March 20, 2009 Is there a way of modifying this, or using something similar, that will enable me to select users from the mysql database with the letter 'v'? Do you mean anywhere in their name, or starting with v? Link to comment https://forums.phpfreaks.com/topic/150384-picking-out-different-letters-from-mysql/#findComment-789760 Share on other sites More sharing options...
whelpton Posted March 20, 2009 Author Share Posted March 20, 2009 Is there a way of modifying this, or using something similar, that will enable me to select users from the mysql database with the letter 'v'? Do you mean anywhere in their name, or starting with v? Starting With A V Link to comment https://forums.phpfreaks.com/topic/150384-picking-out-different-letters-from-mysql/#findComment-789763 Share on other sites More sharing options...
Maq Posted March 20, 2009 Share Posted March 20, 2009 You need to use something like: LIKE 'V%' Link to comment https://forums.phpfreaks.com/topic/150384-picking-out-different-letters-from-mysql/#findComment-789778 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.