$this versus mysql |
[eluser]Pascal Kriete[/eluser]
The first one uses the CodeIgniter database class which supports a variety of database types (postgre, mysql(i), odbc, etc). If you're connecting to a mysql database, CI will use mysql_insert_id internally so in that case the two statements are essentially the same. The former will make your application more portable as it provides a unified syntax for the different database types. As to why it doesn't work: 1) Did you load the database class? 2) What query are you running? 3) Where are you using this (controller, model, library)? Do you get any errors? Grrr, seconds slower than Colin. ![]() |
Messages In This Thread |
$this versus mysql - by El Forum - 12-29-2008, 05:10 AM
$this versus mysql - by El Forum - 12-29-2008, 05:57 AM
$this versus mysql - by El Forum - 12-29-2008, 05:57 AM
$this versus mysql - by El Forum - 12-29-2008, 06:20 AM
|