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::autoPrepare()

DB_common::autoPrepare() -- Automatically prepare an insert or update query

Description

autoPrepare() build automatically an insert or an update sql query and call prepare()with it. The sql query is build by using an ordered array containing fields names.

Parameter

string string $table

name of the table

array $table_fields

ordered array containing the fields names

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

resource - resource handle for the query

Note

This function can not be called statically.

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

Who's Online
Guest Users: 6
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