Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
83 lines (54 sloc) 2.98 KB

Execute

Execute an SQL statement, returns true on success, false if there was an error in executing the sql.

Parameters

Execute($sql)
$sql:The MySQL query to perform on the database.

In most cases you only use this method when Inserting or Updating data, for retrieving data the 5 common methods are:

Name Normal Prepared Statements Cache Normal Cache Prepared Statements
all GetAll PGetAll CacheGetAll CachePGetAll
assoc GetAssoc PGetAssoc CacheGetAssoc CachePGetAssoc
col GetCol PGetCol CacheGetCol CachePGetCol
one GetOne PGetOne CacheGetOne CachePGetOne
row GetRow PGetRow CacheGetRow CachePGetRow
.. seealso::

   `Prepared statements </en/latest/prepared_statements.html>`_ & `PExecute </en/latest/database/PExecute.html>`_.


Examples

You can also catch exception and continue execution: