Added simpleQuery function.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1184 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
parent
db4b1cd4ee
commit
e932c69927
|
@ -21,6 +21,20 @@
|
|||
$conn = mysql_pconnect( ZM_DB_SERVER, ZM_DB_USER, ZM_DB_PASS ) or die("Could not connect to database: ".mysql_error());
|
||||
mysql_select_db( ZM_DB_NAME, $conn) or die("Could not select database: ".mysql_error());
|
||||
|
||||
function simpleQuery( $sql )
|
||||
{
|
||||
global $debug;
|
||||
|
||||
if ( $debug )
|
||||
{
|
||||
echo "SQL:$sql<br>\n";
|
||||
}
|
||||
$result = mysql_query( $sql );
|
||||
if ( !$result )
|
||||
die( mysql_error() );
|
||||
return( $result );
|
||||
}
|
||||
|
||||
function getEnumValues( $table, $column )
|
||||
{
|
||||
$enum_values = array();
|
||||
|
|
Loading…
Reference in New Issue