Welcome Guest, Not a member yet? Register   Sign In
Simple database query
#1

[eluser]s0mmer[/eluser]
First of all hi to all here at CI forum.

My name is Steffen and i finally forced me to dive into a framework today. My choice was CI.

After working a bit today i start to get a nice feeling about it.

With that said, i have my first question ready, in hope some can help me:

Im trying to insert into a database..

A controller with some test code:
#Testing
$this->load->model('register', '', TRUE);
$this->Register->create_user();

Register model:
class Register extends Model {

function Register()
{
parent::Model();
}

function create_user()
{
$this->createdate = "2009-06-09";
$this->username = "test";
$this->password = "test";
$this->email = "test";
$this->name = "test";

$this->db->insert('pmd_users', $this);
}

}

Im also autoloading 'database' library and i have filled in my db informations.

But i am just getting a blank screen.. is that a sign of a mysql error or am i doing anything wrong with CI?

Best regards..


Messages In This Thread
Simple database query - by El Forum - 09-17-2009, 12:29 PM
Simple database query - by El Forum - 09-17-2009, 01:25 PM
Simple database query - by El Forum - 09-17-2009, 01:39 PM
Simple database query - by El Forum - 09-17-2009, 02:03 PM
Simple database query - by El Forum - 09-17-2009, 02:06 PM
Simple database query - by El Forum - 09-17-2009, 02:50 PM
Simple database query - by El Forum - 09-17-2009, 03:58 PM
Simple database query - by El Forum - 09-17-2009, 05:52 PM
Simple database query - by El Forum - 09-17-2009, 05:56 PM
Simple database query - by El Forum - 09-17-2009, 06:02 PM
Simple database query - by El Forum - 09-17-2009, 06:35 PM
Simple database query - by El Forum - 09-17-2009, 08:17 PM
Simple database query - by El Forum - 09-29-2009, 02:57 PM



Theme © iAndrew 2016 - Forum software by © MyBB