Welcome Guest, Not a member yet? Register   Sign In
SQL Server Not Returning Data
#1

Hi,

I have a model that has a simple query. Here's the code:

PHP Code:
$this->db->select("*")
 ->
from("vmb_TempsAndTolerances")
 ->
where("idgrades"$idgrade)
 ->
where("idtypes"$idtype);
 
 
$query $this->db->get();
 
$result_array $query->result_array

I have profile turned on and this is the query that is generated by this:

Code:
SELECT *
FROM vmb_TempsAndTolerances
WHERE idgrades =  'C19B5EC2-FBCB-4761-9ACE-43297F0876B7'
AND idtypes =  'BFB30716-EA84-4E34-9A81-1A07EAF37AD5'  

When I copy this into SQL Server Management Studio, I get information returned. Yet, $result_array is coming back empty.

I var_dumped both $query and $result_array and here is what I get from that.

Code:
object(CI_DB_sqlsrv_result)[16]
 public 'conn_id' => resource(29, SQL Server Connection)
 public 'result_id' => resource(39, SQL Server Statement)
 public 'result_array' =>
   array (size=0)
     empty
 public 'result_object' =>
   array (size=0)
     empty
 public 'custom_result_object' =>
   array (size=0)
     empty
 public 'current_row' => int 0
 public 'num_rows' => int 4
 public 'row_data' => null

array (size=0)
 empty

No errors are returned. I have many other queries that work just fine.

Any ideas at this point are appreciated.

Thanks
Reply


Messages In This Thread
SQL Server Not Returning Data - by bazianm - 06-09-2015, 09:20 AM
RE: SQL Server Not Returning Data - by mwhitney - 06-09-2015, 12:26 PM
RE: SQL Server Not Returning Data - by bazianm - 06-09-2015, 02:14 PM
RE: SQL Server Not Returning Data - by mwhitney - 06-10-2015, 06:32 AM
RE: SQL Server Not Returning Data - by bazianm - 06-10-2015, 06:43 AM
RE: SQL Server Not Returning Data - by Blair2004 - 06-09-2015, 01:17 PM
RE: SQL Server Not Returning Data - by Blair2004 - 06-13-2015, 08:18 AM



Theme © iAndrew 2016 - Forum software by © MyBB