Darkmatter5 Posted January 8, 2009 Share Posted January 8, 2009 Here's my table members member_id priv_admin priv_file priv_guest priv_news How can I write a query to only select fields starting with "priv_"? I tried "SELECT 'priv_%' FROM mmbers WHERE member_id=1". But that doesn't work. Any help is greatly appreciated! Quote Link to comment https://forums.phpfreaks.com/topic/140015-solved-wildcards-in-query/ Share on other sites More sharing options...
PFMaBiSmAd Posted January 8, 2009 Share Posted January 8, 2009 You cannot. The only wild card for field names in a SELECT is * Quote Link to comment https://forums.phpfreaks.com/topic/140015-solved-wildcards-in-query/#findComment-732541 Share on other sites More sharing options...
Darkmatter5 Posted January 8, 2009 Author Share Posted January 8, 2009 Thanks for the answer! Quote Link to comment https://forums.phpfreaks.com/topic/140015-solved-wildcards-in-query/#findComment-732551 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.