Continuing on from day 1, today, I’ll teach you five different ways to write select statements for your database. If you haven’t watched the first entry in this video series, don’t worry; each video can function on its own as a single tutorial. Having said that, I highly recommend that you watch each screencast.
Catch Up
Day 2
- Follow us on Twitter, or subscribe to the NETTUTS RSS Feed for more daily web development tuts and articles.








“SELECT title, author, contents FROM data WHERE id = ? AND author = ?”;
id = primary key. It will NOT find more rows than 1.
simply return $q->result(); makes function getAll() more smaller instead of adding it to another array called $data.
Hi
I have a problem with UTF-8 charset. Iam swedish so i use letters as “å, ä, ö”.
When i connect to my “db” all l”å, ä, ö” cant show. I have tried to search but dont really know what to do. It has been working before i started to use Codeigniter. I´ll tell you i´m a beginner.
I have tried the “meta tag” with UTF-8 and then all content from the “db” shows correctly but not the regular HTML?
Any suggestion?
Thanks for these great tutorials. I’m just starting out with CodeIgniter so this is a great help.
However, I’m having some trouble with the code in this tutorial.
At the end of the tutorial when everything is done, I’m getting PHP errors when visiting the endresult through my browser:
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\ci_day2\system\codeigniter\Common.php on line 130
Deprecated: Assigning the return value of new by reference is deprecated in C:\xampp\htdocs\ci_day2\system\codeigniter\Common.php on line 136
A PHP Error was encountered
Severity: 8192
Message: Function set_magic_quotes_runtime() is deprecated
Filename: codeigniter/CodeIgniter.php
Line Number: 60
A PHP Error was encountered
Severity: 8192
Message: Assigning the return value of new by reference is deprecated
Filename: libraries/Loader.php
Line Number: 255
A PHP Error was encountered
Severity: 8192
Message: Assigning the return value of new by reference is deprecated
Filename: database/DB.php
Line Number: 133
————–
Any idea what the problem is? Is CodeIgniter not compatible with my PHP version (5.3.0)?
I checked out the latest version of CodeIgniter via SVN and that solved the problem. It was a compatibility issue with PHP 5.3.0.
Again, thanks for these awesome tutorials.
wow…!!this tutorials is so much worth for CodeIgniter learnes..!!CodeIgniter rocks.
Wicked series Jeffrey, thanks so much
Thank you, it was really helpful.
Such a Great Thing .. Thanks Jeff
Wow, binding is way better than typing mysql_real_escape_string() over and over.
Direct Link to the video:
Day 2: Database Selecting Methods
http://a-mirror.video2.blip.tv/NETTUTS-CIDay2743.flv
Vacation. Going over all tutorial submissions today.
yeah its named as CI:Dat 2
What? VACATION? Good gawd. *sigh*
*mumbles*….vacation….