note 118828 added to function.sqlsrv-query

From: Date: Fri, 12 Feb 2016 13:45:53 +0000
Subject: note 118828 added to function.sqlsrv-query
Groups: php.notes 
Request: Send a blank email to php-notes+get-204926@lists.php.net to get a copy of this message
Exécution d’une requête de procédure stockée sur SQL SERVEUR(v12) par PHP(5.4) avec les Pilotes SQLSRV(32) exemple: SQL: EXEC SP_COLUMNS t_tickets_Pilotes2 Programme: $conn=sqlsrv_connect($server, $Cnxopt); $tabl='t_tickets_Pilotes2'; $params = array(); $options = array("Scrollable" => SQLSRV_CURSOR_CLIENT_BUFFERED); $pstock="EXEC SP_COLUMNS $tabl"; $result = sqlsrv_query($conn,$pstock, $params, $options); if (!$result) {die ('<br>Erreur1(result): '.print_r(sqlsrv_errors(),true));}} else {echo '<br>retour de : '.sqlsrv_num_rows($result).' ligne(s). ';} if (sqlsrv_num_rows($result) > 0) { while ($row = sqlsrv_fetch_array($result, SQLSRV_FETCH_ASSOC)) { if( $conn === false ) {die( print_r( '<br>Erreur2 Fetch: '.sqlsrv_errors(), true));} $rescol[] = $row["COLUMN_NAME"]; } } else {echo '<br>Pas de résultat.';} sqlsrv_free_stmt($result); sqlsrv_close($conn); ---- Server IP: 72.52.91.14 Probable Submitter: 2a02:8420:6303:5900:a0c6:6ca5:5af4:2d51 ---- Manual Page -- http://php.net/manual/en/function.sqlsrv-query.php Edit -- https://master.php.net/note/edit/118828 Del: integrated -- https://master.php.net/note/delete/118828/integrated Del: useless -- https://master.php.net/note/delete/118828/useless Del: bad code -- https://master.php.net/note/delete/118828/bad+code Del: spam -- https://master.php.net/note/delete/118828/spam Del: non-english -- https://master.php.net/note/delete/118828/non-english Del: in docs -- https://master.php.net/note/delete/118828/in+docs Del: other reasons-- https://master.php.net/note/delete/118828 Reject -- https://master.php.net/note/reject/118828 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#204926) next »