Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2016
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. function p2a($query, $connection, $debug=0){ //Gelen arrayı, belirtilen tabloya kaydeder
  2. if($debug==1) echo "<div class='alert alert-info alert-dismissable'>$query</div>";
  3. $result=$connection->query($query);
  4. @(int)$count=$result->rowCount();
  5. if($count>0){
  6. return $result->fetchAll();
  7. }else{
  8. return array();
  9. }
  10. }
  11.  
  12.  
  13.  
  14. $ozer=p2a(query,$db);
  15.  
  16. if($ozer){
  17. echo "ok";
  18. }else{
  19. echo mysql_error();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement