Правка определения типа в подстановке SQL строки
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
|
//Шаблон класса для авторизации пользователя (под проекты переделывается)
|
||||||
class DBMSUser
|
class DBMSUser
|
||||||
{
|
{
|
||||||
constructor(){
|
constructor(){
|
||||||
|
|||||||
@ -77,6 +77,12 @@
|
|||||||
$v = str_replace('\'', '\\\'', $v); //так как в SQL строку вставляется
|
$v = str_replace('\'', '\\\'', $v); //так как в SQL строку вставляется
|
||||||
$v = '\'' . $v . '\'';
|
$v = '\'' . $v . '\'';
|
||||||
}
|
}
|
||||||
|
}if($t=="NULL" || $t==null){
|
||||||
|
if ($v == '') {
|
||||||
|
$v = 'NULL';
|
||||||
|
} else {
|
||||||
|
$v='\''.$v.'\'';
|
||||||
|
}
|
||||||
}else{
|
}else{
|
||||||
$v='\''.$v.'\'';
|
$v='\''.$v.'\'';
|
||||||
}
|
}
|
||||||
@ -619,6 +625,7 @@
|
|||||||
$nextnode = $nextnode->nextSibling;
|
$nextnode = $nextnode->nextSibling;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
$vType=gettype($_SESSION['USER_ID']);
|
||||||
$sql_query=str_replace('${_user_id}',getSQLValue(gettype($_SESSION['USER_ID']),$_SESSION['USER_ID']),$sql_query);
|
$sql_query=str_replace('${_user_id}',getSQLValue(gettype($_SESSION['USER_ID']),$_SESSION['USER_ID']),$sql_query);
|
||||||
if($objListR!=null && $objListR->getAttribute('order')!='' && $objListR->getAttribute('order')!=null && $objListR->getAttribute('order')!='null')
|
if($objListR!=null && $objListR->getAttribute('order')!='' && $objListR->getAttribute('order')!=null && $objListR->getAttribute('order')!='null')
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user