Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
open-source
OSE
Commits
3829072b
Commit
3829072b
authored
Aug 28, 2019
by
Laurent Lécluse
Browse files
Amélioration de la gestion des NULL
parent
b5849b5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
admin/src/BddAdmin/Table.php
View file @
3829072b
...
...
@@ -181,7 +181,7 @@ class Table
*
* @return bool
*/
public
function
delete
(
$where
,
array
$options
=
[]):
bool
public
function
delete
(
$where
=
null
,
array
$options
=
[]):
bool
{
$params
=
[];
$sql
=
"DELETE FROM
\"
$this->name
\"
"
.
$this
->
makeWhere
(
$where
,
$options
,
$params
);
...
...
@@ -391,7 +391,11 @@ class Table
{
if
(
!
isset
(
$this
->
transformCache
[
$transformer
][
$value
]))
{
$val
=
$this
->
getBdd
()
->
select
(
sprintf
(
$transformer
,
':val'
),
[
'val'
=>
$value
]);
$this
->
transformCache
[
$transformer
][
$value
]
=
$this
->
sqlToVal
(
current
(
$val
[
0
]),
$ddl
);
if
(
isset
(
$val
[
0
])){
$this
->
transformCache
[
$transformer
][
$value
]
=
$this
->
sqlToVal
(
current
(
$val
[
0
]),
$ddl
);
}
else
{
$this
->
transformCache
[
$transformer
][
$value
]
=
null
;
}
}
return
$this
->
transformCache
[
$transformer
][
$value
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment