In this episode we are going to build a User Signup Form following these steps:
- We build a “User” Model with Doctrine.
- Learn about Mutators.
- Create tables using Doctrine.
- Remove index.php from CodeIgniter urls
- Build and Style the Signup Form.
- Learn about Helpers, Libraries and how to extend them.
- Form Validation and checking for duplicates.

"CodeIgniter and Doctrine from Scratch" Series:
Let’s build a Doctrine Model
Since we are building a user signup form today, it is best to start with a “User” Model.
Our model will be extending the Doctrine_Record class, which will represent records in a table named “user”.
So let’s make one:
- Create a file named user.php under system/application/models
- We name the class User, matching the file name.
The class name is capitalized, but the filename is always lowercase. (This is a CodeIgniter rule, rather than Doctrine, but we’re still going go with it for consistency.) - We add a method named setTableDefinition(), which will contain column info.
- We also add a method named setUp(), which will contain additional options.
system/application/models/user.php
<?php
class User extends Doctrine_Record {
public function setTableDefinition() {
$this->hasColumn('username', 'string', 255, array('unique' => 'true'));
$this->hasColumn('password', 'string', 255);
$this->hasColumn('email', 'string', 255, array('unique' => 'true'));
}
public function setUp() {
$this->setTableName('user');
$this->actAs('Timestampable');
}
}
Looks simple right? Now let’s go over the code.
$this->hasColumn()
Structure:
$this->hasColumn($name, $type = null, $length = null, $options = array());
This function call tells Doctrine about the table column structure. Everything except the $name field is optional.
Supported $type‘s are: Boolean, Integer, Float, Decimal, String, Array, Object, Blob, Clob, Timestamp, Time, Date, Enum, Gzip.
$options are passed in an array, as ‘name’ => ‘value’ pairs. We passed an option named unique for 2 columns, which means we will have unique indexes on them.
We don’t need to get into more detail on this, but if you want to read more, read Doctrine docs.
$this->setTableName()
Structure:
$this->setTableName($table_name);
Simply sets the table name the Model will use. This can have a totally different name than the Model.
$this->actAs()
Adds a behavior to the model.
The one we used was Timestampable. It adds 2 fields to the table and manages them. They are called created_at and updated_at. And you guessed it, they keep track of the records create and update times.
Note: When we add this behavior, we don’t need those 2 columns specified inside the setTableDefinition() function.
Adding Mutators
Let’s say we want our password field to be automatically encrypted for security. This is where Mutators come in.
So, make the following changes to our model.
system/application/models/user.php (new code is highlighted)
<?php
class User extends Doctrine_Record {
public function setTableDefinition() {
$this->hasColumn('username', 'string', 255, array('unique' => 'true'));
$this->hasColumn('password', 'string', 255);
$this->hasColumn('email', 'string', 255, array('unique' => 'true'));
}
public function setUp() {
$this->setTableName('user');
$this->actAs('Timestampable');
$this->hasMutator('password', '_encrypt_password');
}
protected function _encrypt_password($value) {
$salt = '#*seCrEt!@-*%';
$this->_set('password', md5($salt . $value));
}
}
First we added a Mutator function named _encrypt_password to the password column.
Then we implemented it as a method inside our Model class.
Note: For mutators to work, auto_accessor_override option needs to be enabled. We have already done it, in our plugin file doctrine_pi.php.
Let Doctrine create the tables
Why create the user table manually ourselves when we can just let Doctrine do it for us.
We will use the Doctrine static class to create our tables like this:
Doctrine::createTablesFromModels();
So let’s create a simple and reusable script that we can rebuild our database with.
- Create this controller: system/application/controllers/doctrine_tools.php
<?php
class Doctrine_Tools extends Controller {
function create_tables() {
echo 'Reminder: Make sure the tables do not exist already.<br />
<form action="" method="POST">
<input type="submit" name="action" value="Create Tables"><br /><br />';
if ($this->input->post('action')) {
Doctrine::createTablesFromModels();
echo "Done!";
}
}
}
Only pay attention to the highlighted line for now. It simply reads our Doctrine Model class files, and creates tables for them in the database.
I know the code is a bit ugly, but we’re just going to use this controller temporarily as we write our initial models.
- First make sure user table does NOT exist. If it does, drop it using phpmyadmin.
- Go to: http://localhost/ci_doctrine/index.php/doctrine_tools/create_tables and click the button.
- Check out our new table.

Note: The id column got generated automatically. We already have a setting in our doctrine_pi.php plugin file:
// set the default primary key to be named 'id', integer, 4 bytes
Doctrine_Manager::getInstance()->setAttribute(
Doctrine::ATTR_DEFAULT_IDENTIFIER_OPTIONS,
array('name' => 'id', 'type' => 'integer', 'length' => 4));
Now let’s do some more CodeIgniter tweaking.
Removing “index.php” from CodeIgniter urls
We would like to have url’s like this:
http://localhost/ci_doctrine/welcome
instead of this:
http://localhost/ci_doctrine/index.php/welcome
Shorter, cleaner and nicer.
follow these steps:
- Our web server needs mod_rewrite enabled.
For WAMP users: Left-Click the system tray icon -> Apache -> Apache Modules -> rewrite_module - Create a file named .htaccess under our project folder “ci_doctrine”.
- Copy-paste the following:
.htaccess:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /ci_doctrine/index.php/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
ErrorDocument 404 /ci_doctrine/index.php
</IfModule>
Now we need to tell CodeIgniter that we’re removing index.php from our url’s.
- Edit: system/application/config.php
/* |-------------------------------------------------------------------------- | Index File |-------------------------------------------------------------------------- | | Typically this will be your index.php file, unless you've renamed it to | something else. If you are using mod_rewrite to remove the page set this | variable so that it is blank. | */ $config['index_page'] = "";
That’s it!
To make sure it’s working, visit: http://localhost/ci_doctrine/welcome.
You should see the welcome page.
Building the Signup Form
Before we start coding, let’s decide how we’re going to do this
The Game plan
We want a Controller named signup, so the url for the signup form becomes http://localhost/ci_doctrine/signup
We would like this signup controller to load a View named signup_form by default, which will contain the html for the form.
The form will submit to a method named submit inside the signup controller i.e. signup/submit.
From there we need to validate the user input. Display errors if needed.
Finally save the new user to the database using our new Doctrine Model.
“Signup” Controller
- Create this file: system/application/controllers/signup.php
<?php
class Signup extends Controller {
public function __construct() {
parent::Controller();
}
public function index() {
$this->load->view('signup_form');
}
}
Now let’s go over the code.
- First we created a constructor method (line 5). This will get called first every time.
Constructors are optional, however there is a reason I decided to create one, which we will see in a bit. - In the constructor, we always must call the parent constructor first (line 6).
- In the index() method, (which acts as the default method for the controller), we load a View named signup_form.
“signup_form” View
- Create this file: system/application/views/signup_form.php
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Signup Form</title> </head> <body> <div id="signup_form"> <p class="heading">New User Signup</p> </div> </body> </html>
For now it’s just a simple HTML file.
You should see the output:
New User Signup
CodeIgniter Helpers
Helpers are located in system/helpers. They contain procedural utility functions that make our lives easier.
In this tutorial, we will be using the url and form Helpers.
They can be loaded like this:
$this->load->helper('url');
Or load multiple helpers at once:
$this->load->helper(array('form','url'));
CodeIgniter Libraries
Libraries are very similar to Helpers, but they tend to be Object Oriented instead.
We will be using the form_validation library, and load it like this:
$this->load->library('form_validation');
Once it’s loaded, we can access it like this:
$this->form_validation->//...
Add them to the controller
- Edit: system/application/controllers/signup.php
<?php
class Signup extends Controller {
public function __construct() {
parent::Controller();
$this->load->helper(array('form','url'));
$this->load->library('form_validation');
}
public function index() {
$this->load->view('signup_form');
}
}
Note: When you load Helpers and Libraries inside the Constructor, they become available in all methods of that Controller. For example, now index() function can use them.
Note2: When Views are loaded, they also can use the Helpers and Libraries that the Controller had loaded.
Form Helper
Now that we have it loaded, let’s use our Form Helper functions.
- Edit: system/application/views/signup_form.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Signup Form</title>
</head>
<body>
<div id="signup_form">
<p class="heading">New User Signup</p>
<?php echo form_open('signup/submit'); ?>
<p>
<label for="username">Username: </label>
<?php echo form_input('username'); ?>
</p>
<p>
<label for="password">Password: </label>
<?php echo form_password('password'); ?>
</p>
<p>
<label for="passconf">Confirm Password: </label>
<?php echo form_password('passconf'); ?>
</p>
<p>
<label for="email">E-mail: </label>
<?php echo form_input('email'); ?>
</p>
<p>
<?php echo form_submit('submit','Create my account'); ?>
</p>
<?php echo form_close(); ?>
</div>
</body>
</html>
I highlighted all the different kinds of functions we just called. These functions create the html for our form tags and elements.
And in the source code you can see:
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Signup Form</title> </head> <body> <div id="signup_form"> <p class="heading">New User Signup</p> <form action="http://localhost/ci_doctrine/signup/submit" method="post"> <p> <label for="username">Username: </label> <input type="text" name="username" value="" /> </p> <p> <label for="password">Password: </label> <input type="password" name="password" value="" /> </p> <p> <label for="passconf">Confirm Password: </label> <input type="password" name="passconf" value="" /> </p> <p> <label for="email">E-mail: </label> <input type="text" name="email" value="" /> </p> <p> <input type="submit" name="submit" value="Create my account" /> </p> </form> </div> </body> </html>
Let's give it Style
- Create a folder named css directly under our project folder ci_doctrine
- Create file: css/style.css
body {
font-family: "Trebuchet MS",Arial;
font-size: 14px;
background-color: #212426;
color: #11151E;
}
input, textarea, select {
font-family:inherit;
font-size:inherit;
font-weight:inherit;
}
#signup_form {
margin-left: auto;
margin-right: auto;
width: 360px;
font-size: 16px;
}
#signup_form .heading {
text-align: center;
font-size: 22px;
font-weight: bold;
color: #B9AA81;
}
#signup_form form {
background-color: #B9AA81;
padding: 10px;
border-radius: 8px;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
}
#signup_form form label {
font-weight: bold;
}
#signup_form form input[type=text],input[type=password] {
width: 316px;
font-weight: bold;
padding: 8px;
border: 1px solid #FFF;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
}
#signup_form form input[type=submit] {
display: block;
margin: auto;
width: 200px;
font-size: 18px;
background-color: #FFF;
border: 1px solid #BBB;
}
#signup_form form input[type=submit]:hover {
border-color: #000;
}
#signup_form .error {
font-size: 13px;
color: #690C07;
font-style: italic;
}
This tutorial is not about CSS, so there is not much to explain here.
- Edit: system/application/views/signup_form.php again.
- Add the highlighted lines:
<!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>Signup Form</title> <link rel="stylesheet" href="<?php echo base_url(); ?>css/style.css" type="text/css" media="all"> </head> <body>
As you can see, we just called the base_url() function, which returns http://localhost/ci_doctrine/ in this case. This function is part of the URL Helper.
- Go to: http://localhost/ci_doctrine/signup, you will see:

Form Validation
If you press the submit button now, you will receive a 404 error:

Because our submit() method does not exist.
- Edit: system/application/controllers/signup.php
<?php
class Signup extends Controller {
public function __construct() {
parent::Controller();
$this->load->helper(array('form','url'));
$this->load->library('form_validation');
}
public function index() {
$this->load->view('signup_form');
}
public function submit() {
if ($this->_submit_validate() === FALSE) {
$this->index();
return;
}
$this->load->view('submit_success');
}
private function _submit_validate() {
// validation rules
$this->form_validation->set_rules('username', 'Username',
'required|alpha_numeric|min_length[6]|max_length[12]');
$this->form_validation->set_rules('password', 'Password',
'required|min_length[6]|max_length[12]');
$this->form_validation->set_rules('passconf', 'Confirm Password',
'required|matches[password]');
$this->form_validation->set_rules('email', 'E-mail',
'required|valid_email');
return $this->form_validation->run();
}
}
Let's go over all the code we just added:
- We add 2 methods: submit() and _submit_validate().
- submit() get's called when the form is submitted to signup/submit.
First it validates the input. If it fails, it calls the index() method, which display the Signup Form again. - If no errors found, we load a View named submit_success, which we will create in a bit.
- _submit_validate() is just a private function we created, that contains the form validation stuff.
And it returns the result of the Validation (true or false).
Let's look at how the form validation functions work:
When we loaded the Form_Validation Library earlier
First we set the rules like this:
$this->form_validation->set_rules('username', 'Username',
'required|alpha_numeric|min_length[6]|max_length[12]');
The first parameter is the name of the form field.
The second parameter is the literal name for it, for display purposes.
The third parameter is a list of validation rules, separated by the pipe character "|".
You can see a list of validation rules here.
Finally we the run the validation by calling run() (line 42), which will return FALSE if a user input does not validate.
Displaying Validation Errors
Next thing we need to do is display the errors to the user.
- Edit: system/application/views/signup_form.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Signup Form</title>
<link rel="stylesheet" href="<?php echo base_url(); ?>css/style.css"
type="text/css" media="all">
</head>
<body>
<div id="signup_form">
<p class="heading">New User Signup</p>
<?php echo form_open('signup/submit'); ?>
<?php echo validation_errors('<p class="error">','</p>'); ?>
<p>
<label for="username">Username: </label>
<?php echo form_input('username',set_value('username')); ?>
</p>
<p>
<label for="password">Password: </label>
<?php echo form_password('password'); ?>
</p>
<p>
<label for="passconf">Confirm Password: </label>
<?php echo form_password('passconf'); ?>
</p>
<p>
<label for="email">E-mail: </label>
<?php echo form_input('email',set_value('email')); ?>
</p>
<p>
<?php echo form_submit('submit','Create my account'); ?>
</p>
<?php echo form_close(); ?>
</div>
</body>
</html>
validation_errors() displays a list of the errors returned from the form validation (line 17).
The first and second arguments we passed are the html codes to be used to enclose each error output.
Also, On lines 21 and 33 we now pass a second argument to the form_input() function call. This way, when the form is re-displayed to the user, it will be populated with the values he entered previously, so he doesn't have to start all over again.
Submit Success View
We will keep this one simple for now.
- Create: system/application/views/submit_success.php
Success!
Test The Form
- Enter some invalid data into the form and submit.
http://localhost/ci_doctrine/signup

And if you enter everything correctly, you should see the Success! message.
Saving the User
Now that our form works, we're going save the new user to the database using our Doctrine Model.
- Edit the submit() function under system/application/controllers/signup.php:
<?php
class Signup extends Controller {
// ...
public function submit() {
if ($this->_submit_validate() === FALSE) {
$this->index();
return;
}
$u = new User();
$u->username = $this->input->post('username');
$u->password = $this->input->post('password');
$u->email = $this->input->post('email');
$u->save();
$this->load->view('submit_success');
}
// ...
}
As you can see, all we do is create a User object, assign the parameters, and call save(), and Doctrine should save the new record to the database. It's that simple.
Note: We are using $this->input->post() to get the submitted form values. When working with CodeIgniter, we do NOT use superglobals such as $_POST directly. This provides added security benefits.
Note2: We do NOT use any SQL filtering such as mysql_real_escape_string() when assigning the user input to the Doctrine Model, because Doctrine will take care of filtering for us.
Test the Form
- Go to: http://localhost/ci_doctrine/signup, and submit it with proper values.
- Check the contents of the table:

It's working great. But we're not quite done yet.
One Little Problem
Try submitting the form again with the same username and e-mail, and you will see:
<br />
<b>Fatal error</b>: Uncaught exception 'Doctrine_Connection_Mysql_Exception' with message 'SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'testing' for key 'username'' in C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php:1084
Stack trace:
#0 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection\Statement.php(253): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Statement))
#1 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php(1049): Doctrine_Connection_Statement->execute(Array)
#2 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php(693): Doctrine_Connection->exec('INSERT INTO use...', Array)
#3 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection\UnitOfWork.php(595): Doctrine_Connection->insert(Object(Doctrine_Table), Array)
#4 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine in <b>C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php</b> on line <b>1084</b><br />
The problem is, we tried to insert a duplicate value into a unique table column.
Handling Duplicates
We could simply check for the existence of a duplicate with something like this:
$user_table = Doctrine::getTable('User');
if ($user_table->findOneByUsername($username)) {
// ... username already exists!
}
This is the first time we are looking into fetching records using Doctrine.
In the first line, we get the table object for our User Model. The name we pass is the name of the Model, and NOT the name of the table. This is important to know, in case your model and tables are named differently.
Then we call a magic function named findOneBy*(). It is magic, because it can be called on any other property, like findOneByEmail(). You basically need to append the property name, (which can be in camelCase format).
We could just add this code to our _submit_validate() function, for both username and email fields, however that's not quite what I want to do.
Extending CodeIgniter Libraries
Since we're using Doctrine to save time and avoid code duplication, it's only fitting that we continue with the same idea here.
We might need to check for duplicate records for other Models or from other Controllers later on. So we're going to build a reusable form validation rule, by extending the Form Validation class.
This way, other forms will have access to the same functionality later on, without having to duplicate code.
- Create: system/application/libraries/MY_Form_validation.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
class MY_Form_validation extends CI_Form_validation {
function unique($value, $params)
{
$CI =& get_instance();
$CI->form_validation->set_message('unique',
'The %s is already being used.');
list($model, $field) = explode(".", $params, 2);
$find = "findOneBy".$field;
if (Doctrine::getTable($model)->$find($value)) {
return false;
} else {
return true;
}
}
}
Let's go over the code:
- Line 3: The new class needs to have the prefix MY_, and extends the core class named CI_Form_validation.
- Line 5: We are going to create a validation rule named unique. With this form_validation class, names of the methods match the names of the rules, due to how the parent class is setup.
- Line 5: First argument $value is value of the form field input.
- Line 5: Second argument $params is the parameter passed to the rule. Our rule will have this structure: unique[model.field]. You will see it in a bit.
- Lines 7-9: We need to get the CodeIgniter super object, so that we can access the form_validation instance, and set the error message.
- Lines 12+: extract from the model.field values, build the name of the findOneBy function, and check for existing records.
You can read more about creating libraries in the docs.
Using the new form validation rule
- Edit 2 lines in: system/application/controllers/signup.php
<?php
class Signup extends Controller {
// ...
private function _submit_validate() {
// validation rules
$this->form_validation->set_rules('username', 'Username',
'required|alpha_numeric|min_length[6]|max_length[12]|unique[User.username]');
// ...
$this->form_validation->set_rules('email', 'E-mail',
'required|valid_email|unique[User.email]');
// ...
}
// ...
}
As you can see, now we can use our new form validation rule named unique. We also provide the model name and the field name to this rule, in square brackets.
Test the form again
- Go to: http://localhost/ci_doctrine/signup
- Try to signup with the same values twice.
You will see 2 errors:

Stay Tuned
This is it for today. We covered quite a few new subjects and I hope you enjoyed it.
In the next episode, we create a User Login system.
See you next time!

#1 by fredquie on November 2nd, 2009
| Quote
Vraiment très bons tes tutoriaux…Really very awsome your tutorials !!!
#2 by bala on April 29th, 2011
| Quote
very nice
#3 by zack on November 2nd, 2009
| Quote
I’m just blown away again.
Reccomended donation amount?
#4 by Burak on November 2nd, 2009
| Quote
Thank you.
I haven’t done this before, so I don’t know.
I’m just glad to be getting more readers.
#5 by Gummiball on November 3rd, 2009
| Quote
Really nice. Very cool tutorial. Still waiting for the next chapter.
#6 by zack on November 4th, 2009
| Quote
Day 4!
#7 by Kezza on November 5th, 2009
| Quote
This is awesome, bring on day 4!!!! SOON!
#8 by Gerard on November 5th, 2009
| Quote
Great tuorials, reading you from France. Thx for all.
Wating for the Day 4 !
#9 by Burak on November 5th, 2009
| Quote
Thank you everyone for the nice words.
I am working on the 4th article.
Pingback: CodeIgniter and Doctrine from scratch. Day 4 – User Login. | PHP and Stuff
#10 by Kyle Farris on November 9th, 2009
| Quote
Really great work here man. The validation rule was very well done. Doctrine is becoming more and more appealing each “day” that you write. Keep it up!
#11 by shinokada on November 12th, 2009
| Quote
Brilliant! I appreciate you efforts and thank you for an excellent post.
I am just hoping more and more posts are coming near future.
It seems like Doctorine is useful for creating a installation file to create tables and insert data. Please keep writing practical applications.
#12 by Emre on November 14th, 2009
| Quote
Very very useful tutorial about CodeIgniter and Doctrine, I have ever seen.
Screenshot really makes sense on understanding the tutorial.
Congratulations man!
–
[Turkish] Burak kardesim gercekten tebrik ederim seni, cok basarili gidiyorsun. Devamini bekliyoruz [/Turkish]
#13 by shinokada on November 15th, 2009
| Quote
Question: I am not really sure what’s happening in “list($model, $field) = explode(“.”, $params, 2);”.
For example $params is username from …|unique[User.username]‘, which can be Jonh. So how come you can explode it?
#14 by Burak on November 15th, 2009
| Quote
$params would be User.username, or whatever is inside the brackets. I explode (split) it to get model name and field name.
#15 by shinokada on November 15th, 2009
| Quote
I think I found the answer for my previous question.
However I am not sure where you defined that First argument $value is value of the form field input and Second argument $params is the parameter passed to the rule?
#16 by Burak on November 15th, 2009
| Quote
I didn’t need to define those. The base class CI_Form_validation does all that work, and we are just extending it.
When it sees a rule named ‘unique’ it attempts to call a method with the same name, and also passes those 2 arguments.
This all happens internally when we call “$this->form_validation->run()”.
#17 by Marcel Marnix on November 26th, 2009
| Quote
A Tip for creating a .htaccess file under windows:
Create a textfile named htaccess.txt
Paste the code and save the file.
Open a dos box and go to ci_doctrine
Then use the copy command to create the .htaccess file
cd C:\wamp\www\ci_doctrine
copy htaccess.txt .htaccess
#18 by Burak on November 26th, 2009
| Quote
That works. But I think Notepad can save a file as .htaccess too. When you’re saving, select the Save As Type “All” instead of “Text Documents”, and just type .htaccess as the file name.
But personally I work with Aptana, which has no problem with creating a file with that name.
#19 by Marcel Marnix on November 27th, 2009
| Quote
Yep, notepad does the trick (a lot quicker)
#20 by kit on December 1st, 2009
| Quote
the unique form validation thing works, but i’m getting “Unable to access an error message corresponding to your field name.” instead of the proper “the username/email is already being used.” i copied and pasted the code, so i have no idea why it’s not working.
any ideas?
#21 by kit on December 1st, 2009
| Quote
sorry, my bad. i used “Unique” instead of “unique” in my validation rules.
#22 by yfi on December 10th, 2009
| Quote
I have a question.
This line:
Doctrine_Manager::getInstance()->setAttribute(
Doctrine::ATTR_DEFAULT_IDENTIFIER_OPTIONS,
array(‘name’ => ‘id’, ‘type’ => ‘integer’, ‘length’ => 4));
Great tutorials.
Generates an id field of length 10. Even in your phpmyadmin screenshot.
Why is that? Shouldn’t it be int(4) ?
Also, later on when i’m trying to create model relationships.
I am getting an mysql error.
I read here: http://tinyurl.com/yh9lt8d
That this error is due to trying to link fields which aren’t strictly the exact same type. such as int(4) to int(11).
I took a closer look and in fact the fields i’m linking are of either length 10 for the ‘id’ column and 11 for something like ‘user_id’.
But in my models they are all specified like this:
hasColumn(‘user_id’, ‘integer’, 4);
#23 by Burak on December 10th, 2009
| Quote
’4′ is the bytesize, as in 32bit integer. But in a MySQL schema, when you see int(10), the number 10 is just used for display reasons, it doesn’t have to do with the size of the field. I found an article that explains it: http://www.bajb.net/2008/10/mysql-int1-or-int10/
About the Error, you probably got it because you tried to link a SIGNED integer field to an UNSIGNED integer field. You see in the doctrine_pi.php I also set this:
Doctrine_Manager::getInstance()->setAttribute(
Doctrine::ATTR_DEFAULT_COLUMN_OPTIONS,
array(‘notnull’ => true, ‘unsigned’ => true));
So, all fields will default to UNSIGNED unless you override it in the Model definition.
#24 by yfi on December 10th, 2009
| Quote
That’s so strange about the int lengths.
I am also using the unsigned integer default. I’m not sure how I would’ve overwritten it.
Thank You so much. This explains a lot.
#25 by Brayan on December 15th, 2009
| Quote
Hi, can I edit error messages? (from the form_validation)
I’m brazilian, and I need to translate my projects.
Thank you 4 the nice tuts, keep it up
#26 by Burak on December 15th, 2009
| Quote
http://codeigniter.com/user_guide/libraries/form_validation.html#settingerrors
#27 by AzizLight on December 18th, 2009
| Quote
Ok I finally made some time to follow those tuts while writting the code myself. I have a couple comments:
1 – Good Job!
2 – Some of the html is quite atrocious – … – Really? lol. But since this is a tut series about php I guess it’s bordeline acceptable..(sorry, I’m a perfectionist :S )
3 – The php code is very interesting. I never actually thought of calling another action from a controller, I usually use redirects (since you use the URL helper in this tut, you could have used redirect())
4 – The form helper also has a method for generating the labels: form_label(‘Username’, ‘username’);
5 – I loved the list() , expode() trick. I didn’t even know the list construct existed, now I’m gonna use it in my projects
6 – You probably know that, but you can set validation rules in a form_validation config file. That’s what I usually do, it let’s me keed my code seperated and have smaller controllers. The only time where I put validation rules outside of the form_validation config file is when I have to generate the rules dynamically (ie: when you don’t know how many form fields there will be). Also, I don’t like to have anything else than actions in my controller. The only exception is when I have to create callback methods which I have to include in my controllers (I haven’t found a solution for that yet, haven’t really tried either).
All in all, great tutorial.
Once again Good Job and Thanks a lot!
I’m gonna try to catch up to day 9 this week-end.
#28 by Burak on December 18th, 2009
| Quote
1. Thanks!
2. Someone else already mentioned the heading thing, I agree.
3. If you redirect, you will lose the current variables, such as form validation errors. (Unless you want to use flashdata).
4. Good to know.
5.
6. Yeah, I like to do that too sometimes. But I chose to do it this way to keep things simple in the tutorial.
#29 by AzizLight on December 18th, 2009
| Quote
Sorry about the double post. Between the two “-” there was supposed to have:
… withouth the spaces.
(You could have used an h1-3 tag, that’s what they’re made for
)
#30 by Aziz Light on December 18th, 2009
| Quote
Type your comment here
Good pointI haven’t thought of that…I think you just solved one of my problem in anothe project lol.
I could have used userdata but the problem with that is it uses either cookies, which is not convenient because cookies are limited to 4kb, or a database, which is completely bloted in 90% of the cases.
The only problem with calling another action is that if you already loaded a view you can’t “unload” it, so you can only use it one time and then you have to use a redirect. (correct me if I’m wrong)
Anyway, thanks for the clarification
#31 by mehdy mahmood on December 21st, 2009
| Quote
Fatal error: Uncaught exception ‘Doctrine_Connection_Mysql_Exception’ with message ‘SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘u.email’ in ‘field list” in C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php:1084 Stack trace: #0 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection\Statement.php(253): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Statement)) #1 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php(1013): Doctrine_Connection_Statement->execute(Array) #2 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Query\Abstract.php(1094):
im getting the following error , when i press the create my account bottom . please help me .
Doctrine_Connection->execute(‘SELECT u.id AS …’, Array) #3 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Query\Abstract.php(1142): Doctrine_Query_Abstract->_execute(Array) #4 C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Query.php(276): Doctrine_Query_Ab in C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php on line 1084
#32 by Burak on December 21st, 2009
| Quote
Does your user table have the email field?
Did you run this controller: http://localhost/ci_doctrine/index.php/doctrine_tools/create_tables ?
#33 by mehdy mahmood on December 21st, 2009
| Quote
yes , i run it , still gut the error .
#34 by mehdy mahmood on December 21st, 2009
| Quote
yep , its ok now , i didnt have the email field . u are really awesome , thank you Burak , please never stop this series .
#35 by Carlos on December 23rd, 2009
| Quote
Burak
Thanks!
I’ve been learning PHP and CI since october and with your tut about Doctrine I’ve done a big jump forward.
#36 by Syaiful Rizky on December 24th, 2009
| Quote
Thanks Burak,
We are really really appreciate it!
#37 by Syaiful Rizky on December 25th, 2009
| Quote
salam Burak,
Beside following your tut about this ‘messageboard-wanna-be’, I want to modify it by adding ‘simple-file-sharing-capability’…
Is it enough to just add ‘links’ attribut;
$this->hasColumn(‘files’, ‘string’, 255); ??
#38 by Syaiful Rizky on December 25th, 2009
| Quote
—-
Search this string on this page “_submit_validate() class”,
should it be “_submit_validate() function”?
—-
uumm,
I am failed in “Handling Duplicate Session by Extending CI Library”, the message is same with “One Little Problem” before…
salam,
THX
#39 by Burak on December 26th, 2009
| Quote
Yea, I meant to say “function”, I just fixed it.
I am not sure why are you getting that error. It would only happen if you try to insert a duplicate value. You can just download the files for the tutorial and compare to what you have.
#40 by harz on December 25th, 2009
| Quote
Hi……
The adding of user is okay but I keep having
error like :
“A PHP Error was encountered
Severity: Warning
Message: date() [function.date]: It is not safe to rely on the system’s timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected ‘America/Los_Angeles’ for ‘-8.0/no DST’ instead
Filename: Listener/Timestampable.php
Line Number: 132″
I am using PHP 5.3 version, so i think it is the date issue of PHP 5.3…. am I right? how can I omit this error?
#41 by Burak on December 26th, 2009
| Quote
http://www.phplivesupport.com/documentation/viewarticle.php?aid=100&pid=3&uid=1
#42 by highlife on December 29th, 2009
| Quote
This is fantastic stuff. I just want to heap on to the praise you’re receiving. These are the highest-quality tutorials I have come across, so complete. I plan on using your series to use Doctrine with Kohana. Your posts are so thorough I feel I will be able to handle the slight differences that Kohana has, even though I’m not very experienced with frameworks. Thank you!
#43 by bolek on December 30th, 2009
| Quote
hi im new with CI and Doctrine, and following the tutorial, a get the error Call to undefined method User::save(), i dont know how to get off this error, can you help me??
TY
bolek
#44 by Prashant on December 30th, 2009
| Quote
Great tutorial. I am going to use this.
#45 by Murat on December 30th, 2009
| Quote
kardeş eline sağlık, türk birinden çok güzel bir haraket
#46 by harz on January 1st, 2010
| Quote
Nice Tutorial…..
I am very glad that there is a tutorial like this for newbie like me…
I hope you don’t mind, I want to ask question…
I am creating a CRUD of users however I will be extending the Form Validation class. because the unique function having conflict of exist values. It is for update of EMAILS and USERNAME so that it is okay if I maintain the current email and username of what i am updating.
the problem is:
1. i want to send three values which will be the table,column,id to the new function updator.
2. i want to check if the user id of existing email is the user id of what i am using right now.
I am trying create a updater function by modifying the existing edit function.
function updator($value, $params, $id)
{
list($model, $field, $id) = explode(“.”, $params, 3);
$find = “findOneBy”.$field;
if (Doctrine::getTable($model)->$find($value)) {
CHECK IF THE USER ID IS THE ONE I AM USING RIGHT NOW
} else {
return true;
}
}
example:
if my username is : phpandstuff
if i update the profile of phpandstuff it is okay if i maintain the username but still unique.
*ps:
i am not using session but a url value “/” for editing
thanks so much…..
MORE power!
#47 by Prashant on January 2nd, 2010
| Quote
This is really awesome.
#48 by Marcello Romani on January 4th, 2010
| Quote
This is superb tutorial! Please keep posting! Thank you very much.
#49 by Julian on January 12th, 2010
| Quote
Excellent post. Congratulations.
#50 by DynamiteN on January 14th, 2010
| Quote
i get this error, when i try too signup with same user details, to see that those new rules work…
Fatal error: Uncaught exception ‘Doctrine_Connection_Mysql_Exception’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘DynamiteN’ for key ‘username” in /var/www/application/plugins/doctrine/lib/Doctrine/Connection.php:1082 Stack trace: #0 /var/www/application/plugins/doctrine/lib/Doctrine/Connection/Statement.php(269): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Statement)) #1 /var/www/application/plugins/doctrine/lib/Doctrine/Connection.php(1042): Doctrine_Connection_Statement->execute(Array) #2 /var/www/application/plugins/doctrine/lib/Doctrine/Connection.php(687): Doctrine_Connection->exec(‘INSERT INTO use…’, Array) #3 /var/www/application/plugins/doctrine/lib/Doctrine/Connection/UnitOfWork.php(631): Doctrine_Connection->insert(Object(Doctrine_Table), Array) #4 /var/www/application/plugins/doctrine/lib/Doctrine/Connection/UnitOfWork.php(562): Doctrine_Connection_UnitOfWork->processSingleInsert(Object(User)) #5 /var/www/application/plugins in /var/www/application/plugins/doctrine/lib/Doctrine/Connection.php on line 1082
i did copy – paste everything to be sure , dont know whats causing it
#51 by DynamiteN on January 16th, 2010
| Quote
I have no idea what the problem with this is , but it happens every time i try to do a duplicate when signup,
to be sure i didnt mess anything up i have even downloaded the files to compare, if anyone have eny ideas i would love to hear them…
#52 by Burak on January 24th, 2010
| Quote
Did you add the unique validation rule we created? unique[User.username]
I am testing it here and it seems to work fine. It gives ‘The Username is already being used.’ message.
Try downloading the files from the link in the article and running them.
#53 by DynamiteN on January 24th, 2010
| Quote
Hi and thanks for replying,
now u gonna find out something wierd,
i did this tutorial from scratch first time on my own comp that i run windows on and use WAMP for apache and such.
afterward i have been setting up an server in my LAN with linux on to have as my “experimental” web server on and it works really fine,
BUT when i do run this on my own comp (windows) that duplicate (unique) rule works FINE,
but on my other server the one with linux on it it wont work :S ,
and yes i have downloaded and rechecked and double checked can’t find it :/ ,
i am gonna check again soon with a program that can find all any different things on files auto … to be sure
#54 by Egemen on January 24th, 2010
| Quote
I’m a WAMP user, I counter same fault. I think that source of this fault is WAMP. Do you suggest me any bundle ?
#55 by Motti on January 15th, 2010
| Quote
really good tutorials!
i am just having one question, the unique attribute can only be used when i create the table with doctrine or also with tables that already exists?
i set up this table :
$this->hasColumn(‘id’, ‘Integer’, 11, array(‘unique’ => true));
$this->hasColumn(‘airport_code’, ‘String’, 5, array(‘unique’ => true));
$this->hasColumn(‘airport_name’, ‘String’, 255);
$this->hasColumn(‘country_code’, ‘String’, 2);
$this->hasColumn(‘airport_vip’, ‘Integer’, 255);
$this->hasColumn(‘connection_vip’, ‘Integer’, 55);
$this->hasColumn(‘customs_access’, ‘Integer’, 255);
$this->hasColumn(‘max_people’, ‘Integer’, 255);
$this->hasColumn(‘extra_pax’, ‘Integer’, 255);
$this->hasColumn(‘fast_track’, ‘Integer’, 1);
$this->hasColumn(‘airplane_transit’, ‘Integer’, 1);
and i am able to enter duplicate airport codes
any ideas?
Thanks!
#56 by Burak on January 16th, 2010
| Quote
If you create the table yourself, you should add the unique index yourself.
If you want Doctrine to check for unique values at application level, you can you use the Data Validation functionality: http://www.doctrine-project.org/documentation/manual/1_2/en/data-validation
#57 by Chris on January 17th, 2010
| Quote
I am getting this error when I use $this->load->helper(array(‘form’, ‘url’);
Unable to load the requested file: helpers/_helper.php
#58 by Chris on January 17th, 2010
| Quote
Fixed the previous problem, still got one where its giving me the duplicate error.
#59 by Ivan Rivera on January 21st, 2010
| Quote
It`s not necessary to write a “private word” to make a function private, just put and underscore as the name prefix.
ohh great tutorial, well at least the part I’ m reading.
#60 by Muyiwa on February 6th, 2010
| Quote
I have the following error. I have checked the doctrine site and their forums but i cant seem to get an answer. I have even gone as far as stackoverflow but the solution there did not work for me.
Fatal error: Uncaught exception ‘Doctrine_Connection_Exception’ with message ‘Couldn’t get last insert identifier.’ in C:\wamp\www\ci_day_one\system\application\plugins\doctrine\lib\Doctrine\Connection\UnitOfWork.php:932 Stack trace: #0 C:\wamp\www\ci_day_one\system\application\plugins\doctrine\lib\Doctrine\Connection\UnitOfWork.php(632): Doctrine_Connection_UnitOfWork->_assignIdentifier(Object(User)) #1 C:\wamp\www\ci_day_one\system\application\plugins\doctrine\lib\Doctrine\Connection\UnitOfWork.php(562): Doctrine_Connection_UnitOfWork->processSingleInsert(Object(User)) #2 C:\wamp\www\ci_day_one\system\application\plugins\doctrine\lib\Doctrine\Connection\UnitOfWork.php(81): Doctrine_Connection_UnitOfWork->insert(Object(User)) #3 C:\wamp\www\ci_day_one\system\application\plugins\doctrine\lib\Doctrine\Record.php(1691): Doctrine_Connection_UnitOfWork->saveGraph(Object(User)) #4 C:\wamp\www\ci_day_one\system\application\controllers\hello.php(13): Doctrine_Record->save() #5 [internal function]: Hello->user_test() #6 C:\wamp\w in C:\wamp\www\ci_day_one\system\application\plugins\doctrine\lib\Doctrine\Connection\UnitOfWork.php on line 932
I altered the plugin code to see if it would work but to no avail.
Doctrine_Manager::getInstance()->setAttribute(Doctrine::ATTR_DEFAULT_IDENTIFIER_OPTIONS,array(“name”=>”id”,”type”=>”int”,”length”=>11));
I even tried to add a hasColumn for the id field but i still get the same issue. I am using Doctrine version 1.2.1 with codeigniter 1.7.2. thanks. I am actually building a site similar in principle to your forum with threads and stuff but with a different twist. will send u an invite when its finished. thanks in advance. keep up the good work.
#61 by Burak on February 6th, 2010
| Quote
The type has to be ‘integer’, not ‘int’. And length 4, not 11.
#62 by Muyiwa on February 7th, 2010
| Quote
merci. will do something about it. thanks again.
#63 by Mark on February 11th, 2010
| Quote
I’m getting the following error any hints would be great:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: District::$_table
Filename: Doctrine/Record.php
Line Number: 1095
#64 by Burak on February 13th, 2010
| Quote
I googled and your post on CI forums came up as the first result:
http://codeigniter.com/forums/viewthread/145386/
Looking at your code, I see one problem. This is wrong:
Doctrine_Record::getTable(‘district’)
It should be:
Doctrine::getTable(‘District’)
#65 by Mark on February 15th, 2010
| Quote
Hi Burak, thanks for your response, that was it.
#66 by Spinatch on February 25th, 2010
| Quote
Hi Burak!
First of all, thanks for the great tutorials! Excellent job.
I have the following problem when using the code from this tutorial. Everything worked fine, until I added the custom validation (unique) class/function.
Before I did, I got the standard Doctrine error reporting a unique constraint being violated. When I added the
“|unique[User.email]” to my _submit_validate function, all hell broke loose – the page wouldn’t load at all, the Microsoft JIT Debugger switched itself on and then I got a “no-go” from Apache.
There are no errors in either the Apache or PHP logs, no activity at all.
I placed some debug statements in the “unique” function you created and the error is triggered in the
“Doctrine::getTable($model)->$find($value)” line.
My only clue as to what might be the case is that I have moved the ‘application’ folder to the root of my CI install and there might be some problem with the path to Doctrine. But on the other hand, Doctrine itself works fine, as long as I don’t use the unique-validation function.
I found a comment on one of your previous tuts explaining what to modify in the doctrine_pi.php file when the ‘application’ folder is at root level and I changed the 5th line to:
require_once BASEPATH.’/plugins/doctrine/lib/Doctrine.php’;
Appart from this line, the rest is identical to the file you provided.
Any idea what might be the case or how to debug it for some more clues?
Thanks in advance for any help.
Simon
#67 by Spinatch on February 25th, 2010
| Quote
I’m getting the same errors after implementing the code in the next tutorial (Day 4). I moved my ‘application’ folder back to ‘system’ like in the default CI install, but the problem is still there :/
Perhaps I’m missing some PHP extensions? I’m not using XAMPP or WAMP, I installed Apache, php and mySQL manually, so perhaps some of the settings are not tuned into Doctrine’s needs?
Is there a list of rerquired php/apache extensions/modules that are required for your tutorials to run smoothly?
I might just try getting WAMP and I’ll check if that is the problem.
best regards,
simon
#68 by Spinatch on February 25th, 2010
| Quote
Installed WAMP… everything flies.
some php extension probably missing. any guess which one? It might help someone else suffering the same misery as I did
all the best,
simon
#69 by Cippo on February 26th, 2010
| Quote
Hi Burak,
I’ve got an error that looks like this:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 261900 bytes) in C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Configurable.php on line 453
#70 by Cippo on February 26th, 2010
| Quote
I ran an update to doctrine an solved the problem, finally
Pingback: CodeIgniter- Doctrine ORM Tutorial: A way of enhancing CI | TheUnical Technologies Blog
#71 by Long on March 7th, 2010
| Quote
Could you give a mockup of what relation between form_validation->run() and MY_Form_validation::unique. I have to get a hard thinking but CAN NOT understand why unique[User.email] give MY_Form_validation::unique “the” User.email object itself instead of (value of) $_POST['email']???
Tks for your the best tut!!!
#72 by Long on March 7th, 2010
| Quote
Dear
What is the real value of User.email (in that code “$this->form_validation->set_rules(‘email’, ‘E-mail’,
‘required|valid_email|unique[User.email]‘);”) ?
What’ s happend if I use this code:
—
function unique($value, $strColumnName)
{
$CI =& get_instance();
$CI->form_validation->set_message(‘unique’,
‘The %s is already being used.’);
$find = “findOneBy”.$strColumnName;
if (Doctrine::getTable($model)->$find($value)) {
return false;
} else {
return true;
}
}
—
and then call it later:
—
$this->form_validation->set_rules(‘username’, ‘Username’,
‘required|alpha_numeric|min_length[6]|max_length[12]|unique[username]‘);
$this->form_validation->set_rules(‘username’, ‘Username’,
‘required|alpha_numeric|min_length[6]|max_length[12]|unique[password]‘);
—
#73 by Long on March 7th, 2010
| Quote
Oh I knew!!!
Calling of
set_rules(Form_Field_Name, “Nature”_Name, Rule_1|Rule_2|…)
Will:
1. CI_Form_validation::Rule_1(X, Y) will be called
2. $_POST['Form_Field_Name'] will be passed to X
3. The “text” inside [...] of Rule_1 (if exists) will be passed to Y
So, you wanna pass 2 params into Y instead 1 param, you have to put a.b to [...] like Rule_1[a.b]
And then, you explode with DOT to pass a to Y1, b to Y2?
So, I can code like that Rule[aaa~bbb] and then explode with ~ with no problem?
I think CI should use this syntax Rule_1|Rule_2(param1, param2, param3…, param 10)|Rule_4
And we can simple extends CI_Form_validation like that
class MY_Form_validation extends CI_Form_validation {
function unique($value, $params)
{
…
#74 by Long on March 7th, 2010
| Quote
SORRY
And we can simple extends CI_Form_validation like that
class MY_Form_validation extends CI_Form_validation {
function unique($value, param1, param2, param3…, param 10)
{
…
#75 by Mike on March 9th, 2010
| Quote
I keep running into an issue, with the Doctrine part of the unique validater. I keep getting a fatal error of:
Fatal error: Call to a member function getFieldName() on a non-object in /home/splug/public_html/backend/system/application/plugins/doctrine/lib/Doctrine/Hydrator/Graph.php on line 290
I’ve tried it on 2 servers, with 3 different versions of Doctrine 1.2.1, 1.2.0, 1.1.6. I was not able to find any specifics within either the source that would prevent this from working. I know you don’t support Doctrine, but posting here in case someone else had the issue and found a fix.
Thanks for the awesome threads though.
#76 by zeeshaan on March 12th, 2010
| Quote
for handling duplicates.. can’t we just make use of doctrine exception? it will give the “already exist” message if we catch the exception at save();
like
try {
$u->save();
}
catch (Doctrine_Connection_Exception $e) {
echo ‘Code : ‘ . $e->getPortableCode();
echo ‘Message : ‘ . $e->getPortableMessage();
#77 by teresa on March 15th, 2010
| Quote
I really like doctrine and would like to learn more about. Unfortunately I can’t create the user table and receive the following error and even after reinstalling doctrine code it does not help. I checked all the code but can’t find anything. Your help is very welcome. Here the error messages:
Fatal error: Uncaught exception ‘Doctrine_Exception’ with message ‘Couldn’t find class Post’ in C:\xampp\htdocs\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Table.php:299 Stack trace: #0 C:\xampp\htdocs\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Table.php(249): Doctrine_Table->initDefinition() #1 C:\xampp\htdocs\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php(1126): Doctrine_Table->__construct(‘Post’, Object(Doctrine_Connection_Mysql), true) #2 C:\xampp\htdocs\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Relation\Parser.php(278): Doctrine_Connection->getTable(‘Post’) #3 C:\xampp\htdocs\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Relation\Parser.php(404): Doctrine_Relation_Parser->getImpl(‘Post’) #4 C:\xampp\htdocs\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Relation\Parser.php(207): Doctrine_Relation_Parser->completeDefinition(Array) #5 C:\xampp\htdocs\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine in C:\xampp\htdocs\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Table.php on line 299
Thanks and regards
#78 by Chauncey on March 16th, 2010
| Quote
I’m shamefully struggling with the most basic model validations.
I’m working with an Artist model which is:
hasColumn(‘name’, ‘string’, 255, array(‘unique’ => ‘true’, ‘minlength’ => ’4′));
$this->hasColumn(‘info’, ‘string’, 255);
$this->hasColumn(‘website’, ‘string’, 255);
}
}
And i’m trying to build this model from a controller named Artists as following:
public function create(){
//checking the data from the form by calling a method which performs a form_validation
if ($this->_artist_validate() === FALSE) {
$this->add();
return;
}
$a = new Artist;
$a->name = $this->input->post(‘name’);
$a->info = $this->input->post(‘info’);
$a->website = $this->input->post(‘website’);
if(! $a->isValid()){
echo ‘saving failed!’;
} else {
$a -> save();
redirect(‘/artists/’);
}
}
The problem is that $a-> isValid() seems to always be returning true;
So that when I for instance add the same form twice I end up with a fatal error that starts with: “Uncaught exception ‘Doctrine_Connection_Mysql_Exception’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘duplicate_name’ for key ‘name” in C:\Program Files\wamp\www\pronksnor\application\plugins\doctrine\lib\Doctrine\Connection.php:1082″
The SQL error is completely legit but I would expect the isValid() method to catch the error earlier upon running $a -> isValid().
I’m running into walls here figuring i must have missed some basic piece of information.
Thanks in advance for your help and a big up from the Netherlands for all of your lovely tutorials.
#79 by Chauncey on March 16th, 2010
| Quote
complete php file of the artist model
hasColumn(‘name’, ‘string’, 255, array(‘unique’ => ‘true’, ‘minlength’ => ’10′));
$this->hasColumn(‘info’, ‘string’, 255);
$this->hasColumn(‘website’, ‘string’, 255);
}
}
#80 by Chauncey on March 16th, 2010
| Quote
without the php tags
class Artist extends Doctrine_Record {
public function setTableDefinition() {
$this->hasColumn(‘name’, ‘string’, 255, array(‘unique’ => ‘true’, ‘minlength’ => ’10′));
$this->hasColumn(‘info’, ‘string’, 255);
$this->hasColumn(‘website’, ‘string’, 255);
}
}
#81 by Lee on March 25th, 2010
| Quote
Thanks for posting this series of tutorials. Just started learning CI and your tutorials have been really invaluable! Keep up the good work!
#82 by Sofian on March 26th, 2010
| Quote
Hi All, I have trouble on validation_errors()
When I try to submit an empty data, there’s no ERROR message display on the form. It just Display or back to blank From.
Any Guide for this ?
Thx
#83 by Sofian on March 27th, 2010
| Quote
.. hmmm anyone please .. ?
for your information i’m using Apache2, php5 and CI 1.7.2
#84 by Sofian on March 27th, 2010
| Quote
SOLVED !!
I dont really know, can anyone explain this :
I just change file config.php
FROM :
$config['index_page']=”":
TO :
$config['index_page']=”index.php”;
#85 by yaufani adam on March 30th, 2010
| Quote
hi, this tutorial is very easy to understand and very usefull for me
thank you very much for this great tutorial
#86 by S.T on March 30th, 2010
| Quote
Bence de Türkçe ilave olsa iyi olurdu. Ama sanırım Burak bey unutmuş Türkçe’yi. :p
Dersler kaliteli, ama faydalanamadık.
#87 by Brian on March 31st, 2010
| Quote
Hi there! I just wanted to thank you for the great tutorials you are writing.
Thanks and best wishes from Germany!
#88 by Zoran on April 4th, 2010
| Quote
This is really cool thank you, i have been working with CI for the last whole year and have built my own Active Record Abstract Model that extends the native one, so i can share methods among my models, but this is quite cool and very useful in big applications such as e-commerce platforms.
#89 by Zoran on April 4th, 2010
| Quote
Also, i managed to set up and use typical models together with the Doctrine ones in case i need them for something i cannot do with Doctrine. You just need to load the database in the autoload.php, but i am not sure how this manifests over the execution time.
Pingback: Best Tutorials for Web Development » Blog Archive » CodeIgniter and Doctrine from scratch. Day 10 – Pagination
#90 by Dennis on April 25th, 2010
| Quote
I’ve been working with CI for almost a year now and from my experience I always keep the controller clean and instead run validations and so on in the model, after all I think the logic should be there.
Now if I would switch to doctrine, It seems wrong to put the validation in the doctrine class, as doctrine is just for the so called “object relational mapping”.
What do you think about this, should I put the logic in the doctrine class or should I put it in the controller.. or should I keep the model and use doctrine separately (sounds messy) ?
#91 by Ben on May 6th, 2010
| Quote
Hi — thanks for the great tutorials!
I’m having a bit of trouble loading the css information. The pages look unstyled, and if I open the css file in firefox (rather than opening it in a text editor), it’s somehow added a whole bunch of HTML. Like this:
- – - – - – - – - – - – - –
404 Page Not Found
body {
background-color: #fff;
margin: 40px;
… etc.
- – - – - – - – - – - – - –
I think this has something to do with my htaccess file, which I had to modify ’cause of my host (dreamhost). Here’s the htaccess:
- – - – - – - – - – - – - –
RewriteEngine On
RewriteCond $1 !^(index\.php)
RewriteRule ^(.+)$ index.php?$1 [L]
- – - – - – - – - – - – - –
Any ideas on how to fix this?
#92 by Ben on May 6th, 2010
| Quote
Er. The css file actually looks like this (I forgot to escape the html):
- – – – – – – – – – – – – –
<html>
<head>
<title>404 Page Not Found</title>
<style type="text/css">
body {
background-color: #fff;
margin: 40px;
… etc.
#93 by Dennis on May 8th, 2010
| Quote
Just add something like this (.*).css in RewriteCond:
RewriteCond $1 !^(index\.php|(*).css)
#94 by Ben on May 8th, 2010
| Quote
No dice — I get a 500 Internal Server Error on every page.
#95 by Ben on May 8th, 2010
| Quote
Nevermind — I fixed it!
#96 by Ben on May 8th, 2010
| Quote
Or not. (Gawd, I wish I could edit these posts.)
I went back to the htaccess file recommended in this tutoral, and the styling works (hence the post above) — but if I try to access any page but the main index, like “login”, I get a blank page that says “No input file specified.”
#97 by Ben on May 8th, 2010
| Quote
…and I found a solution at http://codeigniter.com/forums/viewthread/92609/#730734
Finally got it working.
#98 by mark r on May 29th, 2010
| Quote
excellent tutorials! thank you very much!
I am using MAMP and wanted to let you know that the .htaccess trick to make the URL’s cleaner does not work. I found code form this site: http://www.grafikkaos.co.uk/article/81-getting-started-with-codeigniter
This is what I used and it worked for me:
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
ErrorDocument 404 /ci_doctrine/index.php
Thank you again so much, you are awesome!!
#99 by mark r on May 29th, 2010
| Quote
I ran into a small problem with the tutorial. By accident, I put the MY_Form_validation.php file into system > libraries instead of system > application > libraries… this caused a php error.
Thank you again for these tutorials. I am very grateful for them!
#100 by Jiten on June 17th, 2010
| Quote
Great tutorial! Burak.. Thanks a Lot..
#101 by Ben on June 18th, 2010
| Quote
Just wanted to say thanks for this great tutorial ! Very helpful!
#102 by Haqqi on June 18th, 2010
| Quote
Hi Burak, I have a problem.
Your tutorial is really good. One thing i want to expand is I want to use modular extension such as HMVC or matchbox for CI. The problem is, Doctrine can’t access models which are in modules.
For example, i have created a model in a module. When I call createTableFromModels(), it didn’t include model in the module. What should I do so that Doctrine can know that in each module, there are also models that maybe using Doctrine_Record as superclass..
#103 by Cameron on June 21st, 2010
| Quote
I ran into a little problem in setting up the .htaccess file to get rid of the index.php page. It turns out that the default configuration for the stock apache install on OS X is pretty restrictive, so in order to make it so that the .htaccess file was actually used, I had to edit the httpd.conf file as well as the conf files for users. I’m no .htaccess wiz, so I just decided to make a little note of it down here in case anyone runs into the same problem on a MAMP-type development setup to make sure that the AllowOverride directive is what it is supposed to be in both of those places. Also, a little typo, in that same section of this tutorial, the config file is referenced as /system/application/config.php, when it is in another directory down (/system/application/config/config.php).
Thank you so much for these wonderful tutorials, they are very well put together. Nice layout, good pace, and great explanations! Keep up the awesome work. Now I have to catch up to day 12!
#104 by Nathan Jackson on June 22nd, 2010
| Quote
Nice tutorials, though I don’t like the look of CI’s non OOP format for the form functions.
Thats why i have been trying cakephp, but that seemed to much fluff.
#105 by Alex Inoa on June 25th, 2010
| Quote
Burak, God bless you.
This tutorial is awsome, thanks for share such interesting information.
Be able to teach to others it is a Gift and a great talent.
I am looking forward the next days of the series. I hope you can make more and more;)
#106 by Lucas on August 2nd, 2010
| Quote
What if you don’t want your default id to be id?
Doctrine_Manager::getInstance()->setAttribute(
3 Doctrine::ATTR_DEFAULT_IDENTIFIER_OPTIONS,
4 array(‘name’ => ‘id’, ‘type’ => ‘integer’, ‘length’ => 4));
For each table I have I use a different id. for example if my table is login it is login_id.
Any help would be great. Thanks!
#107 by Giuseppe on August 9th, 2010
| Quote
Hi, Burak! Thanks for this guide!
I’ve a question, how can I change the error message of the required validation (The X field is required.)? I would like to rewrite it in my language…
#108 by Rómulo on August 12th, 2010
| Quote
You are the man!
Thanks you so much for sharing your knowledge with the world!
Fantastic work!
greetings!
#109 by Davan on August 17th, 2010
| Quote
Burak,
I have been building an application using your wonderful tutorial. Let me pause here to thank you for the wonderful work you have done and to thank you for your generosity and assistance.
With my application I am running into a problem with all my controllers using models. When the model is being instantiated. for [eg. $u = new User();] I get the following error:
A PHP Error was encountered
Severity: Notice
Message: Undefined property: Guardian::$users
Filename: libraries/Loader.php
Line Number: 1035
Fatal error: Call to a member function _assign_libraries() on a non-object in C:\wamp\www\ci\system\libraries\Loader.php on line 1035
Where could I be going wrong. Since I was using the code I downloaded from you as a base do you have any idea where I may have missed a change. the reference to a users object seems like a hold-over and I cant find where.
Here is the code for the guardian model
hasColumn(‘first_name’,'varchar’,20);
$this->hasColumn(‘surname’,'varchar’,20);
$this->hasColumn(‘home_phone’,'varchar’,14);
$this->hasColumn(‘mobile_phone’,'varchar’,14);
$this->hasColumn(‘office_phone’,'varchar’,14);
$this->hasColumn(‘email_address’,'varchar’,50);
$this->hasColumn(‘company’,'varchar’,40);
$this->hasColumn(‘occupation’,'varchar’,40);
$this->hasColumn(‘additional_skills’,'varchar’,40);
$this->hasColumn(‘parent_of’,'integer’,10);
$this->hasColumn(‘relationship’,'enum’,array(‘values’=>array(‘Father’,'Mother’,'Guardian’)));
}
public function setUp()
{
$this->hasMany(‘Student’,array(‘local’=>’parent_of’,'foreign’=>’id’));
$this->setTableName(‘Guardian’);
$this->actAs(‘TimeStampable’);
}
}
Here is the guardian controller.
load->helper(array(‘form’,'file’,'url’));
$this->load->library(‘form_validation’);
}
public function index()
{
$this->load->view(‘guardian_form’);
}
public function add()
{
$this->load->view(‘guardian_form’);
}
public function submit()
{
$g = new Guardian();
$g->first_name=$this->input->post(‘first_name’);
$g->first_name=$this->input->post(‘first_name’);
$g->surname=$this->input->post(‘surname’);
$g->home_phone=$this->input->post(‘home_phone’);
$g->office_phone=$this->input->post(‘office_phone’);
$g->mobile_phone=$this->input->post(‘mobile_phone’);
$g->email_address=$this->input->post(‘email_address’);
$g->company=$this->input->post(‘company’);
$g->occupation=$this->input->post(‘occupation’);
$g->additional_skills=$this->input->post(‘additional_skills’);
$g->parent_of=$this->input->post(‘parent_of’);
$g->relationship=$this->input->post(‘relationship’);
$g->save();
}
}
where may I be going wrong? Please help. I have been stressing over this a few days now. I know it must be something simple. Thank in advance for your help.
#110 by Davan on August 24th, 2010
| Quote
Hey just in case any one was having the same problem as me. the issue was my model and controller had the same name. As a result another instance of my controller was loaded and not my model .
FYI
#111 by Dave on September 16th, 2010
| Quote
Using codeignitor 1.7.2 I get a fatal error indicating the form_open function can not be found. I have verified and reverified the code and it exactly matches the tutorail. Appears the load helper code may not be working but not sure how to validate this error.
Google was not my friend and was hopping you might have some insite
#112 by Dave on September 16th, 2010
| Quote
Resolved the form_open error. Had to move the Helper and libary loads from the __construct() function to the index() function.
#113 by Preps on September 20th, 2010
| Quote
Hi Burak,
I am newbie to php (and web development). I have followed your tutorial to create the signup form.
I am having trouble with saving the user information ( currently no records exist in the DB).
I suspect something to do with the connection. I am using MAMP, netbeans, and doctrine 1.2.3.
Mysql listens to connection on 3306, I could not find a port variable in config/database.php to assign mysql default port.
I get the following error in “php_error.log” –
#0 /Applications/MAMP/htdocs/CIProject/system/application/plugins/doctrine/lib/Doctrine/Connection/Statement.php(269): Doctrine_Connection->rethrowException(Object(PDOException), Object(Doctrine_Connection_Statement))
#1 /Applications/MAMP/htdocs/CIProject/system/application/plugins/doctrine/lib/Doctrine/Connection.php(1042): Doctrine_Connection_Statement->execute(Array)
#2 /Applications/MAMP/htdocs/CIProject/system/application/plugins/doctrine/lib/Doctrine/Connection.php(687): Doctrine_Connection->exec(‘INSERT INTO use…’, Array)
#3 /Applications/MAMP/htdocs/CIProject/system/application/plugins/doctrine/lib/Doctrine/Connection/UnitOfWork.php(647): Doctrine_Connection->insert(Object(Doctrine_Table), Array)
#4 /Applications/MAMP/htdocs/C in /Applications/MAMP/htdocs/CIProject/system/application/plugins/doctrine/lib/Doctrine/Connection.php on line 1082
Appreciate your help.
Thanks
Preps
#114 by Dunc on September 21st, 2010
| Quote
Hi Burak,
I am new to MVC – PHP – Doctrine so this may be a stupid question, but I have to ask.
Should the saving of data to the database not be handled in the model? In the tutorial the data for a new user is saved from the controller… I thought that MVC principles meant that all database interaction should be done in the model, and that the response from the model should be returned to the controller, which will then decide which view should be displayed.
Cheers
#115 by Doni on September 21st, 2010
| Quote
wah i got this error message
Fatal error: Uncaught exception ‘Doctrine_Connection_Exception’ with message ‘Couldn’t locate driver named mysql’ in C:\Program Files\AppServ\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php:492 Stack trace: #0 C:\Program Files\AppServ\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection\Mysql.php(101): Doctrine_Connection->connect() #1 C:\Program Files\AppServ\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Transaction.php(186): Doctrine_Connection_Mysql->connect() #2 C:\Program Files\AppServ\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php(1384): Doctrine_Transaction->beginTransaction(NULL) #3 C:\Program Files\AppServ\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Export.php(1201): Doctrine_Connection->beginTransaction() #4 C:\Program Files\AppServ\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Export.php(1099): Doctrine_Export->exportClasses(Array) #5 C:\Program Files\AppServ\www\ci_ in C:\Program Files\AppServ\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php on line 492
help me please….
#116 by DF on October 7th, 2010
| Quote
You just keep on getting a BLANK PAGE instead of any PHP error messages after trying to submit a duplicate entry? It’s because you follow the leader, Burak, blindly. Rollback fix:
1) rename ‘.htaccess’ to ‘_htaccess’
2) edit /system/application/config/config.php and re-do:
‘$config['index_page'] = “index.php”;’
//’$config['index_page'] = “”;’
3) edit /index.php, search for the first line below and add the second:
error_reporting(E_ALL);
ini_set(‘display_errors’, ’1′);
Now you should see the error messages, again!
Keep in mind to disable the error messaging before deploying your application to live server. Instead of displaying all errors to all users, enable log files instead. Search for “log_threshold” in main ‘config.php’. Edit “log_threshold” and “log_path” accordingly.
That’s it!
@Burak: Doing tutorials one cannot think of everything. Having said this your tutorial is just great and provides useful information about CI and Doctrine.
Muchas gracias!
#117 by Dermis on October 12th, 2010
| Quote
nice tutorial for a newbies like me. thanks alot
#118 by drakkar on October 13th, 2010
| Quote
RUN.. thanks
#119 by Harman on October 16th, 2010
| Quote
Great tutorials. Thanks Burak!
Question: I am a newbie to MVC, CI and Doctrine, so maybe my question is not that relevant. But shouldnt the CRUD methods be located inside the Model rather than the Controller? I know we are not using the CI Models and hence putting the CRUD in Doctrine Model would cause complications. But I was wondering if the alternative of putting the CRUD code in the controller is a good practice or not?
Cheers
#120 by kamochu on October 20th, 2010
| Quote
Great tutorials!! Very clear and the examples are working fine!
#121 by Amine on October 20th, 2010
| Quote
amazing quality tutorial ! Thanks for everything !
keep up the good work
#122 by Dido on November 24th, 2010
| Quote
I have the same problem. What is the solution ?
#123 by Alfredo on November 26th, 2010
| Quote
Tks for the tutorial!!!, i have a question,
How recover password?, how add a recovery password via email?
#124 by mctaco on December 1st, 2010
| Quote
no offense mate but give it a little thinking.. with the elements here and a little googling you can achieve it
#125 by Brett on January 1st, 2011
| Quote
At the company I work at, we have strict standards for how our code is written. One of those standards says that all of our variables, tables, fields, functions, etc are Camel Cased and we prefix tables and variables with their type since we use loosely typed languages.
For example: tblUsers, intUserID, strName, objUser, etc.
When I create the tables using ORM, the case is not maintained. My main concern is consistency across all of our applications so we need case to be maintained. Is there any way to do this?
#126 by John on February 1st, 2011
| Quote
Please help!
http://localhost/ci_doctrine/index.php/doctrine_tools/create_tables
I can’t create tables..
this errors appear:
( ! ) Fatal error: Uncaught exception ‘Doctrine_Connection_Exception’ with message ‘PDO Connection Error: SQLSTATE[42000] [1049] Unknown database ‘ci_doctrine” in C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php on line 480
( ! ) Doctrine_Connection_Exception: PDO Connection Error: SQLSTATE[42000] [1049] Unknown database ‘ci_doctrine’ in C:\wamp\www\ci_doctrine\system\application\plugins\doctrine\lib\Doctrine\Connection.php on line 480
#127 by Jehnee on February 25th, 2011
| Quote
thanks for this wondeful tutorial so far so good no errors… many thanks.
#128 by Bangon Kali on March 6th, 2011
| Quote
Hi Guys! I’m trying to follow this tutorial, but I’m using Doctrine 2 and Codeigniter 2. I have solved all problems but until I got to the validation extension, I think i hit the bar. There seems to be a depreciation issue. The following line of code results in an error:
if (doctrine::getTable($model)->$find($value))
Here’s the error being shown:
ErrorException [ Fatal Error ]: Call to undefined method Doctrine::getTable()
It’s seems to me that getTable() is not defined anywhere on Doctrine 2.0, or am i missing something? I tried to Google details, but most of what comes out are from Symfony which is quite appalling. I’m hoping someone could boot me up to this cause it’s really a pain in the ass following a tutorial that was a few versions far apart already. Thank though for the very comprehensive tutorial. I’m really liking it! I hope you’ll do on for Version 2 of both Doctrine and Codeigniter. Thanks!
#129 by bala on April 29th, 2011
| Quote
very nice tut
#130 by bala on April 29th, 2011
| Quote
yea these is very nice tutorial. for freashers
#131 by faqih on May 3rd, 2011
| Quote
super sekali….
#132 by Mirta Horton on June 19th, 2011
| Quote
Hello my family member! I want to say that this post is amazing, great written and come with almost all significant infos. I would like to see more posts like this .
#133 by uut3 on July 8th, 2011
| Quote
Burak if you’re a woman maybe i will kiss you for the tutorials.

thanks man.
#134 by uut3 on July 9th, 2011
| Quote
burak i want to ask about enum, why i can’t mak an enum row.
everytime i create enum row it’s become varchar not enum.
#135 by dreath on September 15th, 2011
| Quote
Hi burak Im applying your tutorial in Codeigniter 2.0.3 and Doctrine 2.5
The —Doctrine::getTable($model)->$find($value)—- is not working in doctrine 2. i try this code
$this->doctrine->em->getRepository($model)->findOneBy(array(‘email’ => $value) still not working …. and the error is this
A PHP Error was encountered
Severity: Notice
Message: Undefined property: MY_Form_validation::$doctrine
Filename: libraries/MY_Form_validation.php
Line Number: 20
#136 by dreath on September 15th, 2011
| Quote
i already solved the problem i forgot to add $CI because it was in libraries folder same with Doctrine.php
#137 by Cary on September 15th, 2011
| Quote
Just after examine a number of the blog posts on your website these day or two, i really like your style of blogging. I saved it to my favorites website record and will be checking again in the near future.
Trackback: Listing no credit check apartments in Houston
Trackback: Gebze Motorlu kurye
Trackback: senuke x crack
Trackback: mua chung
Trackback: Copdir
Trackback: Grownup Doll Entertaining * Special knowledge as well as incredible choice of adult toys
#138 by José Daniel on December 22nd, 2011
| Quote
Great Tutorial!!!.
Works for CodeIgniter 2.1.0 and Doctrine 2.1.5.
Thank you!
Trackback: 跑車
Trackback: auto electricians
Pingback: CodeIgniter and Doctrine from Scratch » CodeIgniter Resources
Trackback: Blog trao doi kien thuc ve Hosting
Trackback: personal grants
Trackback: minecraft
Trackback: BWI Parking Coupons
Trackback: web design
#139 by James on March 11th, 2012
| Quote
This is outstanding. I am using CI 2 and Doctrine 2 and learning a lot going through these. Thanks!
#140 by Davon Peek on March 24th, 2012
| Quote
I really like and appreciate your post.Really thanks! Really Cool.
#141 by lady fitness cure for cancer found cancer cure found can i lose weight lose 10 pounds how to lose 10 pounds lady fitness on November 5th, 2012
| Quote
I was suggested this blog by means of my cousin. I am now not positive whether this publish is written by way of him as nobody
else recognize such special about my trouble.
You are incredible! Thanks!
#142 by mine craft hunger games servers on January 27th, 2013
| Quote
I blog often and I genuinely appreciate your information.
This article has truly peaked my interest. I’m going to bookmark your website and keep checking for new details about once a week. I opted in for your RSS feed too.
#143 by Cancer Natural Remedy on February 8th, 2013
| Quote
If some one needs expert view concerning blogging and
site-building afterward i propose him/her to pay a quick visit this webpage, Keep up the good job.
#144 by 2012 UEFA Champions League on March 22nd, 2013
| Quote
Cheers! It’s the best time to make some plans for the future and it is time to be happy. 2012 UEFA Champions League http://educationkentucky.vsoftprojects.com/node/20#comment-158927
#145 by Ang up on April 8th, 2013
| Quote
|
#146 by Buy cheap viagra on April 9th, 2013
| Quote
woltnqiqboetuvgg, Europe online sale viagra, TCibuSw, [url=http://www.falseconfessions.org/]Plantiffs who won their viagra lawsuit in court in 2010[/url], qybBOzF, http://www.falseconfessions.org/ Buy viagra on the internet, YlUcEia.
#147 by HGH on April 9th, 2013
| Quote
ppxlyqiqboetuvgg, HGH, JPjQkZE, [url=http://hghlexicon.com/]Human growth hormone hgh supergreenbiz[/url], zfOwgqh, http://hghlexicon.com/ HGH, UdmgxrL.
#148 by Hostmonster Reviews on April 9th, 2013
| Quote
vzmmsqiqboetuvgg, Review hostmonster, UTtmuFq, [url=http://disneydudes.com/hostmonster/]Hostmonster reviews cnet[/url], itsDuBs, http://disneydudes.com/hostmonster/ Hostmonster reviews, qqxQZsp.
#149 by Barb on April 29th, 2013
| Quote
The teasing, brother-and-sister sort banter between Kathie Lee and
Regis earned them both a large quantity of devoted fans.