added base class file for sql as well as updated users to use class

--HG--
branch : rc-botanic-webdev
hg/feature/sse2
Botanic 12 years ago
parent c66d9cf225
commit 4d3acc9cc0

@ -0,0 +1,11 @@
<?php
class Sql{
public function db_query( $query, $values = array() )
{
echo "tst";
}
}

@ -20,7 +20,7 @@ public function checkUser($username)
return "Username must be 5 or more characters.";
} elseif (!preg_match('/^[a-z0-9\.]*$/', $username)) {
return "Username can only contain numbers and letters.";
} elseif (db_query("SELECT COUNT(*) FROM {users} WHERE name = :name", array(
} elseif (sql::db_query("SELECT COUNT(*) FROM {users} WHERE name = :name", array(
':name' => $username
))->fetchField()) {
return "Username " . $username . " is in use.";

Loading…
Cancel
Save