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! 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 * 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! Link to comment https://forums.phpfreaks.com/topic/140015-solved-wildcards-in-query/#findComment-732551 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.