Welcome Guest, Not a member yet? Register   Sign In
CI Noob having a problem...suprised?
#6

[eluser]dantrag1989[/eluser]
[quote author="crumpet" date="1215723902"]Yeah i think you need to have quotes around your query. Also make sure your autoloading the database library in your autoload conf file.

Have you looked at the active record class? Its a little more code but its so easy to write queries its worth it.

//$sql = "SELECT * FROM library WHERE cat=Training";

would be

$this->db->where('cat', 'Training');
$query = $this->db->get('library');

if you don't want to SELECT * you can use
$this->db->select('name, color, etc');[/quote]

Yeah looks like it was combo of the curly brace and the quotes lol. Its the little things that trip you up...well they always trip me up lol. Thanks for all your help guys!

@Crumpet
I was looking at that earlier and was planning on moving to that once I found my mistake. I eventually want to change Training to a variable so I don't have to write a function for each category. Thanks for your help again!


Messages In This Thread
CI Noob having a problem...suprised? - by El Forum - 07-10-2008, 08:50 AM
CI Noob having a problem...suprised? - by El Forum - 07-10-2008, 09:01 AM
CI Noob having a problem...suprised? - by El Forum - 07-10-2008, 09:53 AM
CI Noob having a problem...suprised? - by El Forum - 07-10-2008, 09:56 AM
CI Noob having a problem...suprised? - by El Forum - 07-10-2008, 10:05 AM
CI Noob having a problem...suprised? - by El Forum - 07-10-2008, 10:19 AM
CI Noob having a problem...suprised? - by El Forum - 07-10-2008, 11:55 AM
CI Noob having a problem...suprised? - by El Forum - 07-10-2008, 02:29 PM



Theme © iAndrew 2016 - Forum software by © MyBB