bad row offset

From: Date: Thu, 02 May 2002 18:53:13 +0000
Subject: bad row offset
Groups: php.general 
Request: Send a blank email to php-general+get-95733@lists.php.net to get a copy of this message
I am a little confused with an error I am receiving on a function I am using. Here is the function: function get_user_data($user,$field) { # get_user_data is a base function assuming no errors have # been passed and will return the data of a specific field # based on the value of $user db_conn(); $query = "SELECT [$field] FROM [users] WHERE [user] = '$user'"; $result = @mssql_query($query) or die("<b>Warning:</b> Unable to complete query - <b>".__LINE__."</b> in <b>$PHP_SELF</b><br>\n"); if($field == "permission") return hexdec(mssql_result($result,0,0)); else return mssql_result($result,0,0); } The error it is giving me is a bad row offset on line 15. Line 15 is the line containing "return hexdec(mssql_result($result,0,0));" I don't understand why it is giving me these errors because I was using this function before with no problems and now it is return this error. Any help would be greatly appreciated, thanks in advance. -josh

« previous php.general (#95733) next »