Advertisement
Guest User

sadasda

a guest
Oct 9th, 2013
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.81 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. Functions.php
  5. */
  6.  
  7.      function result_arrray($query){
  8.        
  9.        $table = array();
  10.  
  11.               while($row = mysql_fetch_array($query)){
  12.                
  13.                 $table[] = $row;
  14.                
  15.               }
  16.              
  17.        return $table;
  18.      }
  19.      
  20. ?>
  21.  
  22. <?php
  23.  
  24.      /*paginata.php*/
  25.      
  26.  
  27.      $lit_query = mysql_query("SELECT `row`, COUNT(rand_din_db) AS numar_camere FROM `tabelul_tau`") or die(mysl_error());
  28.      
  29.      $array_result = result_array($lit_query);
  30.      
  31.           foreach($array_result as $key => $arrkey){
  32.            
  33.             /*
  34.             print $arrkey['numar_camere'];
  35.             print $arrkey['rand_celula_tabel etcc..'];
  36.             */
  37.            
  38.             print_r($arrkey);
  39.            
  40.           }
  41.          
  42.  
  43.  
  44. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement