Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $dbconn = pg_connect ( "host=192.168.21.100 dbname=historique user=stag01 password=stag2016" ) or die ( 'Connexion impossible : ' . pg_last_error () );
- $req_select= "select poste_id, poste_num, poste_sta_id from t_poste; ";
- $res_select = pg_query ( $req_select );
- echo $res_select[1];
- $tabPostes = array();
- var_dump($tabPostes);
- foreach($res_select as $key => $value) {
- $tabPostes[$value['poste_num']] = array(
- 'poste_id' => $value['poste_id'],
- 'poste_sta_id' => $value['poste_sta_id']
- );
- }
- echo $tabPostes;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement