Is there any specific way you want queries handled? What I mean is, do we pass the whole query to mysql_query() or do we handle certain parts of the query via the function? The only thing with taking the whole query is we need to use mysql_escape_string() or similar for any data entered into the database to stop any malicious code.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2002-08-18
Well, in queries.php (in the mysql folder I made under db) we will hold all of our queries (note the example one I created in that file to see how it is done). That query was named example, so using my code you must say sql_query('example') to run that query. This way we can easily make the include files for other DB types to have the same function names, and the same query names, but have it send the correct query.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is there any specific way you want queries handled? What I mean is, do we pass the whole query to mysql_query() or do we handle certain parts of the query via the function? The only thing with taking the whole query is we need to use mysql_escape_string() or similar for any data entered into the database to stop any malicious code.
Well, in queries.php (in the mysql folder I made under db) we will hold all of our queries (note the example one I created in that file to see how it is done). That query was named example, so using my code you must say sql_query('example') to run that query. This way we can easily make the include files for other DB types to have the same function names, and the same query names, but have it send the correct query.