Support Joomla!

references:joomla.framework:database:jdatabase-addquoted

Table of Contents

addQuoted

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Database Class JDatabase Method addQuoted Reference addQuoted() Never Work in Progress

Adds a field or array of field names to the list that are to be quoted. Field names that are added to this list will have the name and value quoted. Field names or values normally need to be quoted if they contain quote characters (eg. John’s should be quoted because it has a “‘“).

Syntax

void addQuoted ( $quoted )

$quoted mixed is either a string containing the name of the field to add to the quote list or an array of strings to be added to the quote list.

Examples

Example

$dbo = JFactory::getDBO();
$dbo->addQuoted( 'description' );

echo 'Description should be: ' . ($dbo->isQuoted( 'description' ) ? 'Quoted' : 'Not Quoted');

might produce:

Result

Description should be: Quoted

Discussion

Full name:
E-Mail:
 
references/joomla.framework/database/jdatabase-addquoted.txt (671 views) · Last modified: 2007/08/15 14:52