TheMessenger's blog

Over-Thinking

So a side project of mine has involved the building of a pure PHP web app to generate a presentation. First off there is no way this is the easiest way to generate a presentation but this is the project as I was placed into it. My problem stems from solving a simple problem with a complex solution. Below is an example of a function that builds a SELECT query. The function takes 7 parameters and does not execute a query.

//This functions takes 6 arguments.
//1     ::      A string containing the table name
//2     ::      An array of strings containing the field to select
//3*    ::      An array of strings containing the column fields names comprising the WHERE statement
//4*    ::      An array of strings containing the respective field values comprising the WHERE statement
//5     ::      An array of special options to determine how the query is run. [Ex: MULTIQUERY, PREFERREDONLY]
//6     ::      The mode [Ex: 0 = Normal, 1 = Debug]
//7     ::      The number of rows to keep when using multiquery.

Syndicate content