Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. $query = "SELECT COUNT(name_x) FROM Status where name_x=.$id.";
  2. $result = mysql_query($query);
  3. $count = $result;
  4.  
  5. $query = "SELECT COUNT(*) as totalno FROM Status where name_x=".$id;
  6. $result = mysql_query($query);
  7. while($data=mysql_fetch_array($result)){
  8. $count = $data['totalno'];
  9. }
  10. echo $count;
  11.  
  12. $query = "SELECT COUNT(*) FROM `Status` where `name_x`= $id";
  13. $result = mysql_query($query);
  14. $row = mysql_fetch_row($result);
  15. $count = $row[0];
  16.  
  17. $query = "SELECT COUNT(*) FROM Status where name_x=$id";
  18. $result = mysql_query($query);
  19. $count = mysql_result($result, 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement