connection

connection

boblacasterboblacaster Posts: 3Questions: 0Answers: 0
edited November 2011 in General
Hi
need some help plse am trying to retrieve records from an mssql database using codeigniter and datatables 1.8 but i get the following error

A PHP Error was encountered

Severity: Warning
Message: mysql_real_escape_string() [function.mysql-real-escape-string]: Access denied for user 'ODBC'@'localhost' (using password: NO)
Filename: libraries/Datatables.php
Line Number: 220

I am able to view the records from firebug but they are not displayed in the datatable. Any help is at most appreciated.

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    you can't use mysql_real_escape_string() until after you've made your db connection. this function actually passes your string to the MySQL system to be escaped.

    move your escape calls AFTER you've made the db connection.
  • boblacasterboblacaster Posts: 3Questions: 0Answers: 0
    thanks worked
This discussion has been closed.