What's new

Welcome to xCrud Community - Data Management and extended PHP CRUD

Join us now to get access to all our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, and so, so much more. It's also quick and totally free, so what are you waiting for?

unset_edit for multiple conditions

sipdorus

New member
Joined
Feb 13, 2023
Messages
11
Reaction score
0
Points
1
Location
Turkiye
hello, I want to unset edit for multiple conditions, but when I write 2 line of unset edit, xcrud works only one code.
for example

$xcrud->unset_edit(true,'status','=','Under review');
$xcrud->unset_edit(true,'lastedited','=','admin');
 

DaDo

Administrator
Staff member
Joined
Dec 1, 2021
Messages
108
Reaction score
23
Points
18
hello, I want to unset edit for multiple conditions, but when I write 2 line of unset edit, xcrud works only one code.
for example

$xcrud->unset_edit(true,'status','=','Under review');
$xcrud->unset_edit(true,'lastedited','=','admin');
Is not supported
 

sipdorus

New member
Joined
Feb 13, 2023
Messages
11
Reaction score
0
Points
1
Location
Turkiye
I found this line at 1.6 documentation

unset_view(), unset_edit(), unset_remove(), duplicate_button() - this methods can get additional condition parameters (with {field_tags})

is there a way to unset edit for multiple conditions in one row?
like
$xcrud->unset_edit(true,'{status}="Under review" and {lastedited}="Admin"');
 

DaDo

Administrator
Staff member
Joined
Dec 1, 2021
Messages
108
Reaction score
23
Points
18
$xcrud->unset_edit(true,'{status}','=',"Under review AND {lastedited}='Admin'"); // try this
 
Top Bottom