Zepo. Posted January 29, 2008 Share Posted January 29, 2008 I have a memberlist where you select a letter ect. How do you make a mysql pull where username starts with $letr Quote Link to comment https://forums.phpfreaks.com/topic/88298-pulling-from-database/ Share on other sites More sharing options...
marcus Posted January 29, 2008 Share Posted January 29, 2008 SELECT * FROM `users` WHERE `username` LIKE '".$letter."%' Quote Link to comment https://forums.phpfreaks.com/topic/88298-pulling-from-database/#findComment-451831 Share on other sites More sharing options...
Zepo. Posted January 29, 2008 Author Share Posted January 29, 2008 Ok thank you, i also have a number link how would i do that? Quote Link to comment https://forums.phpfreaks.com/topic/88298-pulling-from-database/#findComment-451832 Share on other sites More sharing options...
marcus Posted January 29, 2008 Share Posted January 29, 2008 same way. Â // from beginning LIKE '".$letter."%' // from end LIKE '%".$letter."' // in the string LIKE '%".$letter."' Quote Link to comment https://forums.phpfreaks.com/topic/88298-pulling-from-database/#findComment-451835 Share on other sites More sharing options...
Zepo. Posted January 29, 2008 Author Share Posted January 29, 2008 http://eliteladders.com/development/members.php  Doesnt show anything  if(isset($ltr)){ $letter="WHERE 'name' LIKE '".$ltr."%'"; $letterlink="<r=$ltr"; } $stafflist=mysql_query("SELECT id,name,email,aim,website,points,country,lastactive,DATE_FORMAT(joined,'%M %d, %Y') FROM members $letter ORDER BY name LIMIT $page,25"); while(list($id,$name,$email,$aim,$website,$points,$country,$lastactive,$joined)=mysql_fetch_row($stafflist)){ Quote Link to comment https://forums.phpfreaks.com/topic/88298-pulling-from-database/#findComment-451841 Share on other sites More sharing options...
Zepo. Posted January 29, 2008 Author Share Posted January 29, 2008 bump Quote Link to comment https://forums.phpfreaks.com/topic/88298-pulling-from-database/#findComment-451884 Share on other sites More sharing options...
Guernica Posted January 29, 2008 Share Posted January 29, 2008 Where is the display? Its just a mysql query... Quote Link to comment https://forums.phpfreaks.com/topic/88298-pulling-from-database/#findComment-451889 Share on other sites More sharing options...
Zepo. Posted January 29, 2008 Author Share Posted January 29, 2008 http://eliteladders.com/development/members.php There is no error. Quote Link to comment https://forums.phpfreaks.com/topic/88298-pulling-from-database/#findComment-451890 Share on other sites More sharing options...
Zepo. Posted February 2, 2008 Author Share Posted February 2, 2008 Bump Quote Link to comment https://forums.phpfreaks.com/topic/88298-pulling-from-database/#findComment-456277 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.