Menu

Db queries

Developers
2002-08-18
2002-08-18
  • Duncan Campbell

    Duncan Campbell - 2002-08-18

    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.

     
    • Anonymous

      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.

       

Log in to post a comment.