Set WeberTrivia.com to be my default homepage.   Suggest a Question                                               

Suggest A Question : :  Frequently Asked Questions : :  Search : :  Relevant Manuals : : 
PHP Questions : :  Linux Questions : :  MySQL Questions : : 
home  [ Login ] 

DB_common::autoExecute()

DB_common::autoExecute() -- Automatically performs insert or update queries

Description

autoExecute() build automatically an insert or an update sql query and call prepare() and execute() with it. The sql query is build by using autoPrepare(). To call autoExecute, you need only an assoc (key => value) where keys are fields names and values are corresponding values of these fields.

Parameter

string $table

name of the table

array $fields_values

assoc (key => value), keys are fields names, values are values of these fields

integer $mode

type of query to make (DB_AUTOQUERY_INSERT or DB_AUTOQUERY_UPDATE)

string $where

in case of update queries, this string will be put after the WHERE statement

Return value

DB_result - a new DB_result or a DB_Error when fail

Note

This function can not be called statically.

See Introduction - autoPrepare and autoExecute for general using and an example.

Who's Online
Guest Users: 4
Google
Web
WeberTrivia
WeberDev
WeberForums
 Free Sample Chapters  Free Sample Chapters
  Deliver First Class Web Sites: 101 Essential Checklists
Want to learn how to make your web sites usable and accessible? Want to ensure that your sites meet current best practice, without spending hours trawling through incomprehensible specifications and recommendations from dozens of different books, research papers, and web sites? Want to make sure that the sites you build are "right the first time," requiring no costly redevelopments?

More Sample Chapters

PHP General