Jump to content

Consolidating query scripts


markkanning

Recommended Posts

I'm building a site administration backend for a client that will involve multiple insert, update and delete scripts for different tables of a database. I'm trying to avoid having more pages in the admin site than the actual website itself. How does one have one file that includes the database connection, all the variable declarations and all the queries and form processing on one file? It would be nice if I could have the forms involved have an action that references the same processing file and possibly a reference to a function in that file that does the inserting, updating or deleting.

Any thoughts?

Mark
Link to comment
Share on other sites

Here's another scenerio on that same idea(and please forgive the somewhat novice smell that's coming off of the screen): could I at least include multiple, say, include queries for different tables in one processing script? It seems to me, as long as they're dealing with differently named variables, one wouldn't accidently insert data into the wrong table. Is that right? Or is it not good to be querying mutliple tables at once?

Mark
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.