Table of Contents

isQuoted

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

Checks if the field name needs to be quoted (i.e. if it has been added to the array of field names to be quoted with the JDatabase->addQuoted method). Returns true if the field is to be quoted, false otherwise.

Syntax

boolean isQuoted ( $fieldName )

$fieldName string is a string containing the name of the field.

Examples

Example

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

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

might produce:

Result

Description should be: Quoted
Address should be: Not Quoted