jream — 2010-03-24T19:09:29-04:00 — #1
Is there a way to display a tables columns,
and then filter out the column names?
SHOW COLUMNS FROM users
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.
crmalibu — 2010-03-24T20:47:21-04:00 — #2
SHOW COLUMNS FROM users LIKE 'custom_%'
You can also do something like
WHERE TABLE_SCHEMA = 'thedatabasename'
AND TABLE_NAME = 'users'
AND (...other filtering clauses...)
jream — 2010-03-25T19:42:20-04:00 — #3
Well that was easy lol, thanks a lot