Пример #1
0
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();
}
Пример #2
0
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();
}