Guest User

Untitled

a guest
Jun 17th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. <?php
  2.  
  3. $res=mysql_query("SELECT * FROM phaos_spells WHERE charid='$character->user' AND spellid='$spellid'");
  4.  
  5. $num_rows=mysql_num_rows($result);
  6.  
  7. if($num_rows==0)
  8. {
  9. $query="INSERT INTO phaos_spells (charid,spellid) VALUES ('$PHP_PHAOS_USER','$spellid')";
  10. $req=mysql_query($query);
  11. if (!$req)
  12. {
  13. echo "<B>Error ".mysql_errno()." :</B> ".mysql_error().""; exit;
  14. }
  15. }
  16.  
  17. ?>
Add Comment
Please, Sign In to add comment