Revision: 32340
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at September 22, 2010 21:57 by shawntysco
Initial Code
/*FUNCTION: querys
*PURPOSE: querys the database
*RETURNS: $rs - result set
*/
function querys($sql){
$rs=mysql_query($sql);
return $rs;
}
/*FUNCTION: get result
*PURPOSE: querys the database, adds to assicoative array
*REUTRNS: $data - assocative array
*/
function getresult($sql){
$rs=mysql_query($sql);
$data=@mysql_fetch_array($rs);
return $data;
}
Initial URL
linkdeo.net
Initial Description
To use: $update_sql = querys($sql); or $select_sql = getresult($sql); Used simplify selecting rows from a database. You'll need to pass in the SQL statement.
Initial Title
Query the database PHP
Initial Tags
mysql, php, query
Initial Language
PHP