It’s always great to create functions for those things you do a lot. Probably the single most common function I execute is database calls.
Here is a simple script for hitting up your MySQL database with a query:
<?php
if(!function_exists(dbQuery)) {
function db_query($cfg_array, $query) {
. . . → Read More: Tidbit Tuesday on PHP: Simple MySQL Database Query Function


Facebook
Twitter
Digg
Sphinn
LinkedIn
Recent Comments