Welcome Guest, Not a member yet? Register   Sign In
how can i see the actual query generated by AR?
#1

[eluser]mmiranda[/eluser]
Hi, i have a very strange problem with a mssql 2005 server, its just a simple query to a table (using flexigrid helper):


$table_name = "billing_200809";

//Build contents query
$this->db->select('timeOfBilling,credit,ctxt_nocall_login,tariffitem')->from($table_name);
$this->CI->flexigrid->build_query();
$return['records'] = $this->db->get();

//Build count query
$this->db->select('count(timeOfBilling) as record_count')->from($table_name);
$this->CI->flexigrid->build_query(FALSE);
$record_count = $this->db->get();
$row = $record_count->row();
$return['record_count'] = $row->record_count;

In the log i got:

ERROR - 2008-10-11 15:07:44 --&gt; Severity: Warning --&gt; mssql_query() [<a href='function.mssql-query'>function.mssql-query</a>]: message: Incorrect syntax near 'billing_200809'. (severity 15)

ERROR - 2008-10-11 15:07:44 --&gt; Severity: Warning --&gt; mssql_query() [<a href='function.mssql-query'>function.mssql-query</a>]: Query failed

How can i see what is wrong with the querys?
$log_treshold is at 4.


Messages In This Thread
how can i see the actual query generated by AR? - by El Forum - 10-11-2008, 02:13 PM
how can i see the actual query generated by AR? - by El Forum - 10-11-2008, 03:47 PM
how can i see the actual query generated by AR? - by El Forum - 10-12-2008, 07:37 PM



Theme © iAndrew 2016 - Forum software by © MyBB