Follow

Good morning! sqlite3:
SELECT m.name AS tblName,
p.name AS colName,
p.type AS colType,
p.[notnull] AS colNotNull,
p.pk AS colPK,
p.dflt_value AS colDefault,
IIF(INSTR(p.type,'CHAR')>0,'"',' ') AS colDelimiter,
p.name AS colDisplayTitle,
p.cid AS colSortOrder
FROM sqlite_master m
LEFT OUTER JOIN pragma_table_info((m.name)) p
ON m.name <> p.name
WHERE m.name <> 'sqlite_sequence'
AND p.name IS NOT NULL
ORDER BY m.name, p.cid;

· · Web · 1 · 0 · 0

@raimoncoding That is getting the table/field definitions from sqlite3's system tables, so I can dynamically build code to create screens for the data.

See: github.com/CattailNu/SQLite3_P

That's a bit that will let me quickly build a form view (vs datasheet view) of a single record.

@raimoncoding I actually pushed it into a CREATE TABLE and then modified some data for a specialty interface.

@cattailnu Oh. I don't have enough experience with SQL to understand that.

@raimoncoding It's pretty obnoxious, even for people with experience.

@cattailnu yes I know. But that gives more joy when the results are there!

Sign in to participate in the conversation
Designers & Developers

A community for web designers and developers to connect with like-minded fellas from across the globe.