Results 1 to 3 of 3
Thread: PHP Table Column Names
Mar 24, 2010, 16:09 #1
PHP Table Column Names
Is there a way to display a tables columns,
and then filter out the column names?
But I'd like to somehow filter it with
LIKE 'custom_%' -- or however that goes, so it only shows Column names that have custom_ as a prefix.
Or should I do this in PHP?
I'll go through my book again I don't recall seeing something like this off the top of my head.
Mar 24, 2010, 17:47 #2
- Join Date
- Jul 2008
- 0 Post(s)
- 0 Thread(s)
SHOW COLUMNS FROM users LIKE 'custom_%'
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = 'thedatabasename' AND TABLE_NAME = 'users' AND (...other filtering clauses...)
Mar 25, 2010, 16:42 #3