Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. $query = $db->execute("SELECT id FROM " . TBL_ARCHIVES . " WHERE name = '" . clean($_POST['blogArchive'],1,0,0) . "'");
  2.  
  3. if($db->numrows($query) == 0)
  4. {
  5. $query = $db->execute("INSERT INTO " . TBL_ARCHIVES . " (name, created) VALUES ('" . clean($_POST['blogArchive'],1,0,0) . "', " . time() . ")");
  6. }
  7.  
  8. $query = $db->execute("SELECT id FROM " . TBL_ARCHIVES . " WHERE name = '" . clean($_POST['blogArchive'],1,0,0) . "'");
  9.  
  10. if($db->numrows($query) == 1)
  11. {
  12. $row = $db->fetchassoc($query);
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement