Advertisement
Guest User

Untitled

a guest
Jan 28th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. $dbconn = pg_connect ( "host=192.168.21.100 dbname=historique user=stag01 password=stag2016" ) or die ( 'Connexion impossible : ' . pg_last_error () );
  2.  
  3.  
  4. $req_select= "select poste_id, poste_num, poste_sta_id from t_poste; ";
  5. $res_select = pg_query ( $req_select );
  6.  
  7. echo $res_select[1];
  8. $tabPostes = array();
  9. var_dump($tabPostes);
  10. foreach($res_select as $key => $value) {
  11. $tabPostes[$value['poste_num']] = array(
  12. 'poste_id' => $value['poste_id'],
  13. 'poste_sta_id' => $value['poste_sta_id']
  14. );
  15. }
  16. echo $tabPostes;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement