Limbajul PHP
Limbajul PHP
Installation
CodeIgniter4 Overview
General Topics
Building Responses
Modeling Data
Managing Databases
Library Reference
Helpers
Testing
Extending CodeIgniter
Docs »
Note: If all your pages require database access you can connect automatically. See
the connecting page for details.
Standard Insert
$sql = "INSERT INTO mytable (title, name) VALUES (".$db->escape($title).", ".$db-
>escape($name).")";
$db->query($sql);
echo $db->affectedRows();
$query = $db->table('table_name')->get();
The above get() function retrieves all the results from the supplied table. The Query
Builder class contains a full complement of functions for working with data.
Next Previous