mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
add option for force refresh
This commit is contained in:
parent
3be3bb65a3
commit
40a60c9847
1 changed files with 2 additions and 2 deletions
|
@ -78,14 +78,14 @@ class sqlDAL {
|
||||||
* @param array $values A array, containing the values for the prepared statement.
|
* @param array $values A array, containing the values for the prepared statement.
|
||||||
* @return Object Depend if mysqlnd is active or not, a object, but always false on fail
|
* @return Object Depend if mysqlnd is active or not, a object, but always false on fail
|
||||||
*/
|
*/
|
||||||
static function readSql($preparedStatement, $formats = "", $values = array()) {
|
static function readSql($preparedStatement, $formats = "", $values = array(),$refreshCache=false) {
|
||||||
global $global, $disableMysqlNdMethods, $readSqlCached;
|
global $global, $disableMysqlNdMethods, $readSqlCached;
|
||||||
$crc = $preparedStatement.implode($values);
|
$crc = $preparedStatement.implode($values);
|
||||||
if(empty($readSqlCached)){
|
if(empty($readSqlCached)){
|
||||||
$readSqlCached = array();
|
$readSqlCached = array();
|
||||||
}
|
}
|
||||||
if ((function_exists('mysqli_fetch_all')) && ($disableMysqlNdMethods == false)) {
|
if ((function_exists('mysqli_fetch_all')) && ($disableMysqlNdMethods == false)) {
|
||||||
if(empty($readSqlCached[$crc])){
|
if((empty($readSqlCached[$crc]))||($refreshCache)){
|
||||||
$readSqlCached[$crc]="false";
|
$readSqlCached[$crc]="false";
|
||||||
if (!($stmt = $global['mysqli']->prepare($preparedStatement))){
|
if (!($stmt = $global['mysqli']->prepare($preparedStatement))){
|
||||||
log_error("[sqlDAL::readSql] Prepare failed: (" . $global['mysqli']->errno . ") " . $global['mysqli']->error."<br>\n{$preparedStatement}");
|
log_error("[sqlDAL::readSql] Prepare failed: (" . $global['mysqli']->errno . ") " . $global['mysqli']->error."<br>\n{$preparedStatement}");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue