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

  $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));
    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.


PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to