andyd34 Posted February 22, 2010 Share Posted February 22, 2010 I want to fetch a certain group form a mysql table which are stored in the username field I think it will have to be something like this SELECT username FROM session_users WHERE username REGEXP 'Guest_[1-5]' ORDER BY username DESC; I am not sure if this is right, i dont think it is but its not too far away, the reason for this is to auto increment the Guest users to give each one a unique id. i.e. Guest_1, Guest_................ , Guest_344 and so on. Dos anyone have any ideas how i may do this Link to comment https://forums.phpfreaks.com/topic/193003-mysql-query/ Share on other sites More sharing options...
andyd34 Posted February 22, 2010 Author Share Posted February 22, 2010 Well that was easy WHERE username REGEXP 'Guest_' Link to comment https://forums.phpfreaks.com/topic/193003-mysql-query/#findComment-1016457 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.