query('SELECT 1 FROM `' . $m[1] . '` LIMIT 1'); if ($check !== false && $check->num_rows > 0) { $skipped++; continue; } } } if (@$link->query($statement)) { $created++; } else { $errors[] = $link->error . "\n in: " . substr((string)preg_replace('/\s+/', ' ', $statement), 0, 90); } } // Record the version, which the schema's own INSERT may have skipped. @$link->query("UPDATE `znote` SET `version` = '2.0.1'"); $tablesNow = 0; $result = @$link->query("SHOW TABLES LIKE 'znote%'"); if ($result !== false) { $tablesNow = $result->num_rows; } $link->close(); $report = array( 'created' => $created, 'skipped' => $skipped, 'errors' => $errors, 'tables' => $tablesNow, ); if (!$errors) { install_state(array('schema_done' => true)); install_max_step(5); } else { install_error(count($errors) . ' statement(s) failed. The first was: ' . ih((string)$errors[0])); } } } ?>

Schema

Creates the znote_* tables in . Your server's own tables are not touched.

Every statement is CREATE TABLE IF NOT EXISTS, and seed rows are skipped for tables that already hold data — running this on a database that already has some ZnoteX tables adds only what is missing.
Back

Done. statement ran, skipped as already populated. znote_* tables are now present.

statement(s) failed:

Continue Try again