function node_AddMeta($id_a, $id_b, $type, $subtype, $data) { db_Connect(); db_Query("INSERT `" . CMW_TABLE_NODE_META . "` (" . "`id_a`," . "`id_b`," . "`type`," . "`subtype`," . "`data`" . ") " . "VALUES (" . $id_a . "," . $id_b . "," . "\"" . $type . "\"," . "\"" . $subtype . "\"," . "\"" . $data . "\"" . ");"); // TODO: do something on db_query error return db_GetId(); }
function user_Add($id, $mail, $password) { db_Connect(); $password_hash = user_HashPassword($password); db_Query("INSERT `" . CMW_TABLE_USER . "` (" . "`node`," . "`mail`," . "`hash`" . ") " . "VALUES (" . $id . "," . "\"" . $mail . "\"," . "\"" . $password_hash . "\"" . ");"); // TODO: do something on db_query error return db_GetId(); }