From: Alby L. <al...@th...> - 2001-07-05 19:11:57
|
Whilst waiting for bc2 to be ready for production - I'm doing some restructuring of my current project and I'm trying to isolate all of my sql commands into a few dynamic functions. For the most part, I'll be doing a lot of updating, inserting, and querying - big surprise I know. At any rate, I was thinking of building some tables that contain information about the _real_ db structure, so that when I do an insert on a variable driven table definition, I would be able to cycle through the field titles and build my sql call that way. However, I thought, why not just grab the table structure from the tables themselves using the mysql_fetch_field command. So, when I was thinking about this - bringing the db structure out in pieces to a simple dynamic sql query builder - I felt it sounded very much like what I thought the BC metabase to be. However, I did some poking around in the db "metabase" code and I couldn't find that much that made sense from that perspective. Anyone want to try to explain to me what the metabase portion on BC is up to, and if there is anything like what I am describing in BC2? Also, I came across this often used function "case" that I couldn't find in the php manual. Anyone know what this does? It seems to have something to do with the data type thats in the table field. Thanks, Albert Lash al...@th... |