Jump to the post that solved this thread.
Solved: 5 Years, 9 Months ago Need help with database
#5
Solved: 5 Years, 9 Months ago
@Ninethe you can use update method:

    $query = $db->simple_select("servers", "*");
    if($db->num_rows($query) > 0) {
        $db->update_query("servers", array("status" => "ono"));
    } else {
        $db->insert_query("servers", array("status" => "ono"));
    }

WARNING!
I don't know your database, so I don't know if this code will work
My Projects - Support My Projects

Don't forget to rate posts!
Reply
Jump to the post that solved this thread.


Messages In This Thread
Need help with database - by Nineteh - 2015-09-13, 10:01 PM
RE: Writing to the database - by chack1172 - 2015-09-13, 10:14 PM
RE: Need help with database - by Nineteh - 2015-09-13, 10:16 PM
RE: Need help with database - by chack1172 - 2015-09-14, 12:43 PM
Database : Need Help - by Nineteh - 2015-09-13, 10:38 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)