I have the following warning message on the client web page when I use an
order by in my query. If I remove it, the message dissapear.

----------------------------------------------------------------------------
--------------------------------------------------------
   Warning: SQL error: [Microsoft][ODBC SQL Server Driver]Cursor type
changed, SQL state 01S02 in SQLExecute in
D:\Inetpub\wwwroot\info\listedeprix.php on line 9
----------------------------------------------------------------------------
--------------------------------------------------------

Any idea why?

I have the following code
----------------------------------------------------------------------------
--------------------------------------------------------
  odbc_close_all();
  $sql=odbc_connect("informatique","userinfo","userinfopswd");
  $statement = odbc_prepare($sql, "select piece_desc,piece_prix*1.16 as
'prix' , c.categorie_desc from pieces p join categories c on p.categorie_id
= c.categorie_id  order by c.categorie_desc ");
  $result=odbc_execute($statement);
  if ($result!=0)
  {
   while(1)
   {
    $prix=odbc_result($statement, "prix");
    $desc=odbc_result($statement, "piece_desc");
    $categorie=odbc_result($statement, "categorie_desc");
    echo("$categorie :: $desc ($prix)<br>");
    if (odbc_fetch_row($statement)==false)
        break;
    }
  }
  odbc_free_result($statement);
  odbc_close_all();






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to