Database error $sqlerrno: $sqlerr

\n"); print("

Please report the problem to " ."webmaster@easysw.com.

\n"); } // // 'db_count()' - Return the number of rows in a query result. // function // O - Number of rows in result db_count($result) // I - Result of query { if ($result) return (mysql_num_rows($result)); else return (0); } // // 'db_escape()' - Escape special chars in string for query. // function // O - Quoted string db_escape($str) // I - String { return (mysql_escape_string($str)); } // // 'db_free()' - Free a database query result... // function db_free($result) // I - Result of query { if ($result) mysql_free_result($result); } // // 'db_insert_id()' - Return the ID of the last inserted record. // function // O - ID number db_insert_id() { global $DB_CONN; return (mysql_insert_id($DB_CONN)); } // // 'db_next()' - Fetch the next row of a result set and return it as an object. // function // O - Row object or NULL at end db_next($result) // I - Result of query { if ($result) return (mysql_fetch_array($result)); else return (NULL); } // // 'db_query()' - Run a SQL query and return the result or 0 on error. // function // O - Result of query or NULL db_query($SQL_QUERY) // I - SQL query string { global $DB_NAME, $DB_CONN; return (mysql_query($SQL_QUERY, $DB_CONN)); // print("

SQL_QUERY: $SQL_QUERY

\n"); // // $result = mysql_query($SQL_QUERY, $DB_CONN); // $count = db_count($result); // print("

Result = $count rows...

\n"); // // return ($result); } // // 'db_seek()' - Seek to a specific row within a result. // function // O - TRUE on success, FALSE otherwise db_seek($result, // I - Result of query $index = 0) // I - Row number (0 = first row) { if ($result) return (mysql_data_seek($result, $index)); else return (FALSE); } // // End of "$Id: db.php,v 1.5 2004/05/21 03:59:17 mike Exp $". // ?>