Odd PHP Error

Results 1 to 3 of 3
  1. #1
    Member rahulbisme is offline
    MemberRank
    Jun 2008 Join Date
    Stamford, CTLocation
    90Posts

    Odd PHP Error

    Code:
    Warning: mssql_query() [function.mssql-query]: message: Unicode data in a Unicode-only collation or ntext data cannot be sent to clients using DB-Library (such as ISQL) or ODBC version 3.7 or earlier. (severity 16) in C:\inetpub\vhosts\auragunz.com\httpdocs\test\Parts\Member_panel.php on line 22
    
    Warning: mssql_query() [function.mssql-query]: Query failed in C:\inetpub\vhosts\auragunz.com\httpdocs\test\Parts\Member_panel.php on line 22
    
    Warning: mssql_fetch_assoc(): supplied argument is not a valid MS SQL-result resource in C:\inetpub\vhosts\auragunz.com\httpdocs\test\Parts\Member_panel.php on line 23
    This error is coming from likes 22 and 23 which are:

    Code:
    $username = $_SESSION['Username'];
    $get = mssql_query("SELECT * FROM Account WHERE UserID = \"$username\"");
    $blabla = mssql_fetch_assoc($get);
    What's wrong with this?


  2. #2
    Member mutter is offline
    MemberRank
    Dec 2010 Join Date
    ArgentinaLocation
    64Posts

    Re: Odd PHP Error

    try
    I found that changing the version in /etc/freetds.conf from 4.2 to 8.0 fixes this problem without having to make any changes to the SELECT statement
    And change \"$username\" to '$username'

  3. #3
    Member rahulbisme is offline
    MemberRank
    Jun 2008 Join Date
    Stamford, CTLocation
    90Posts

    Re: Odd PHP Error

    That's what everyone told me, it doesn't work.



Advertisement