How do I use in case of Joomla the mysqli bind_param
how would this example should be declared using joomla Database methods?
...
$statement->bind_param('s', $like);
$statement->execute();
How do I use in case of Joomla the mysqli bind_param
how would this example should be declared using joomla Database methods?
...
$statement->bind_param('s', $like);
$statement->execute();
In Joomla! 3.1, PDO/Sqlite and PDO/Oracle are supporting prepared statements, others are not implemented yet.
Given using a 'preparable' connection, it would work this way:
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('...')->where('...');
$query->bind(':s', $like);
$db->setQuery($query);
$records = $db->loadObjectList();
© 2022 - 2024 — McMap. All rights reserved.