Welcome Guest, Not a member yet? Register   Sign In
Troubleshooting my SQL query
#1

[eluser]jonyork[/eluser]
Alright, if I run an sql query in phpmyadmin looking like this I get my desired value

Code:
SELECT `company` FROM `user` WHERE `username` = 'jonathan'

However, ive been hitting my head on the table. this is my CI code

Code:
$this->db->select('company');
$this->db->where('username', 'jonathan');
$company = $this->db->get('user');

and this is the subsequent print_r output

Code:
CI_DB_mysql_result Object ( [conn_id] => Resource id #28 [result_id] => Resource id #33 [result_array] => Array ( ) [result_object] => Array ( ) [current_row] => 0 [num_rows] => 1 [row_data] => )

help is greatly appreciated


Messages In This Thread
Troubleshooting my SQL query - by El Forum - 01-21-2010, 07:57 PM
Troubleshooting my SQL query - by El Forum - 01-21-2010, 08:21 PM
Troubleshooting my SQL query - by El Forum - 01-21-2010, 09:00 PM
Troubleshooting my SQL query - by El Forum - 01-21-2010, 09:03 PM
Troubleshooting my SQL query - by El Forum - 01-21-2010, 09:10 PM
Troubleshooting my SQL query - by El Forum - 01-21-2010, 09:13 PM
Troubleshooting my SQL query - by El Forum - 01-21-2010, 09:17 PM
Troubleshooting my SQL query - by El Forum - 01-21-2010, 09:25 PM
Troubleshooting my SQL query - by El Forum - 01-21-2010, 09:30 PM
Troubleshooting my SQL query - by El Forum - 01-21-2010, 09:35 PM
Troubleshooting my SQL query - by El Forum - 01-22-2010, 01:57 AM



Theme © iAndrew 2016 - Forum software by © MyBB