Page 1 of 1
[SOLVED] fetch_row ( mssql )
Posted: Wed Apr 14, 2004 12:25 pm
by ol4pr0
Code: Select all
$idc = '8';
// connection and all that...
//This works
$result = mssql_query("exec sp_query_manhdr01");
/* this doesnt work
* error being returned on screen
*
* Warning: mssql_fetch_row(): supplied argument is not a valid MS SQL-result resource
* in /usr/local/apache/htdocs/user/members/1.php on line 15
*/
$result = mssql_query("exec sp_query_manhdr01") . $idc;
while (list($fecha_envio, $hora_envio, $fecha_inicioi, $guia_madre) = mssql_fetch_row($result)) {
echo " \n";
?>
Posted: Wed Apr 14, 2004 1:50 pm
by JAM
Slap me if I'm off topic =)
Are we thinking about the identifier here? Can't see other use of adding a number to the function as in your example...
mssql_query ( string query [, resource link_identifier [, int batch_size]])
...meaning:
Code: Select all
$result = mssql_query("exec sp_query_manhdr01", $idc);
However, thats not a good idea either I belive (using a static integer like that). The identifier is created when you mssql_connect() to the database.
Posted: Wed Apr 14, 2004 2:33 pm
by ol4pr0
Yes we are talking about the identifier here...
$idc needs to be changed in to something else which is being fetch according to the users login and all that.. lots of checks before getting to that part.
Just to check i put in a $idc = '8';
however the identifier doesnt arrive @ sql
Posted: Thu Apr 15, 2004 1:11 pm
by ol4pr0
Code: Select all
$result = mssql_query("exec sp_wquery_manhdr01 " . $idc);
worked
