I'm struggling with a selection in a Hook.
It should be simple of course, but I'm blind for the solution right now.
The Case:
I have a text field and in the table hook:
Code: Select all
function table_before_insert(&$data, $memberInfo, &$args){
If I use:
Code: Select all
$baseAddressfotos = 'http://server/DataBase/Dir/';
if($data['Field'] = "http" ) return FALSE;
$sql_string = "UPDATE `table` set `field` ='" .$baseAddressfotos . $data['field1']."' WHERE id = ".$data['selectedID'].";";
$result = sql($sql_string,$o);
but the "error" is not explained.Couldn't save the new record
I assume it is because I use de = operator. However the REGEXP operator seems not supported within Appgini.
Could someone please give me a hint, or better: a solution?
I'm using Appgini 5.51 Revision 905
Ron