PEAR Handbuch | ||
---|---|---|
Zurück | Nach vorne |
Updating the data.
updates the database using the objects variables, returns TRUE on success
Beispiel 1. Simple fetch and update
|
This would execute the following SQL statements, both fetching and updating the database.
Beispiel 2. Resulting SQL
|
To perform a general update on a table, use the WhereAdd() method
Beispiel 3. Simple fetch and updated
|
This would execute the following SQL statements, both fetching and updating the database.
Beispiel 4. Resulting SQL
|
Inserting data.
Inserts data into the database and returns the key/ID if any.
Beispiel 5. Simple insert
|
This would execute the following SQL statements, (It may also do sequences on some databases, it uses mysql_next_id on mysql)
Beispiel 6. Resulting SQL
|
Deleting data.
Deletes data from the database, either using primary key or based on a WhereAdd() method call. by default the delete will base it's query on the set variables, however if you wish to use the WhereAdd method you should set the UseWhere parameter to TRUE
Beispiel 7. Simple Delete
|
This would execute the following SQL statements,
Beispiel 8. Resulting SQL
|
Zurück | Zum Anfang | Nach vorne |
Finding and fetching | Nach oben | Advanced Filters |