Entered:
PHP Code:
function field_exists ($table,$field) {
global $DB_site;
$DB_site->reporterror=0;
$DB_site->query("SELECT COUNT(".$field.") AS count FROM ".$table);
$errno=$DB_site->errno;
if (!$errno) {
$errno = 0;
}
$DB_site->reporterror=1;
if ($errno) {
return 0;
} else {
return 1;
}
Returned:
Quote:
Scanning: function field_exists ($table,$field) { global $DB_site; $DB_site->reporterror=0; $DB_site->query("SELECT COUNT(".$field.") AS count FROM ".$table); $errno=$DB_site->errno; if (!$errno) { $errno = 0; } $DB_site->reporterror=1; if ($errno) { return 0; } else { return 1; }
Init'ing...
Finished (3.69 msec)
Found 0 PHP tags, 0 other; is this correct?
PHP tags:
Array
(
)
Everything else:
Array
(
)
|
Regards
- miSt