Hi,
I need to do this where condition:
I have tested this code on the "Where conditions" section:
but this doesn't work because in the script put NULL value between two apexes (i.e. 'NULL') as in the following code:
Someone could help me please?
Thanks
Francesco
I need to do this where condition:
WHERE model.field IS NULL
I have tested this code on the "Where conditions" section:
model.field/is:NULL
but this doesn't work because in the script put NULL value between two apexes (i.e. 'NULL') as in the following code:
wrong mysql condition: WHERE model.field IS 'NULL'
Someone could help me please?
Thanks
Francesco
Hi Francesco,
Please try:
Or
Best regards,
Max
Please try:
model.field/is
Or
model.field/is:{value:null}
Best regards,
Max
They don't work. I have this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' AND `ISCR`.`id_user` IS ''' at line 1 SQL=SELECT COUNT(`USRS`.`id`) AS `USRS.count` FROM `#__users` AS `USRS` LEFT JOIN `#__chronoforms_iscrizione_gara` AS `ISCR` ON `USRS`.`id` = `ISCR`.`id_user` WHERE `ISCR`.`id_gara` IS '' AND `ISCR`.`id_user` IS '';
I tested also:
This code run but doesn't give back Null fields.
I ran the sql string on phpmyadmin, with the right condition IS NULL and it give me the attended results
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' AND `ISCR`.`id_user` IS ''' at line 1 SQL=SELECT COUNT(`USRS`.`id`) AS `USRS.count` FROM `#__users` AS `USRS` LEFT JOIN `#__chronoforms_iscrizione_gara` AS `ISCR` ON `USRS`.`id` = `ISCR`.`id_user` WHERE `ISCR`.`id_gara` IS '' AND `ISCR`.`id_user` IS '';
I tested also:
model.field:
This code run but doesn't give back Null fields.
I ran the sql string on phpmyadmin, with the right condition IS NULL and it give me the attended results
Hi Francesco,
What about the 2nd code block, what error does it return ?
You may try this code in the where conditions:
Best regards,
Max
What about the 2nd code block, what error does it return ?
You may try this code in the where conditions:
<?php
return array("Model.field", null, "is");
Best regards,
Max
Hi Max,
the code
give back this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' AND `ISCR`.`id_user` IS ''' at line 1 SQL=SELECT COUNT(`USRS`.`id`) AS `USRS.count` FROM `#__users` AS `USRS` LEFT JOIN `#__chronoforms_iscrizione_gara` AS `ISCR` ON `USRS`.`id` = `ISCR`.`id_user` WHERE `ISCR`.`id_gara` IS '' AND `ISCR`.`id_user` IS '';
i tested your last code:
but this give me back something as:
WHERE `Model`.`field` = '' AND `Model`.`` = '' AND `Model`.`is` = '';
so CCv6 read the 3 parameters of return array as fields of db table.
CCv6 seem to insert always the parameter between two apexes and the last format of return array is wrong.
Thanks again
Francesco
the code
model.field/is:{value:null}
give back this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' AND `ISCR`.`id_user` IS ''' at line 1 SQL=SELECT COUNT(`USRS`.`id`) AS `USRS.count` FROM `#__users` AS `USRS` LEFT JOIN `#__chronoforms_iscrizione_gara` AS `ISCR` ON `USRS`.`id` = `ISCR`.`id_user` WHERE `ISCR`.`id_gara` IS '' AND `ISCR`.`id_user` IS '';
i tested your last code:
<?php
return array("Model.field", null, "is");
but this give me back something as:
WHERE `Model`.`field` = '' AND `Model`.`` = '' AND `Model`.`is` = '';
so CCv6 read the 3 parameters of return array as fields of db table.
CCv6 seem to insert always the parameter between two apexes and the last format of return array is wrong.
Thanks again
Francesco
Hi Francesco,
Ok, the last code I posted has a small problem, please test this one:
Best regards,
Max
Ok, the last code I posted has a small problem, please test this one:
<?php
return [["Model.field", null, "is"]];
Best regards,
Max
Hi Max,
also with this code I have always the same error about the apexes:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' AND `ISCR`.`id_user` IS ''' at line 1 SQL=SELECT COUNT(`USRS`.`id`) AS `USRS.count` FROM `#__users` AS `USRS` LEFT JOIN `#__chronoforms_iscrizione_gara` AS `ISCR` ON `USRS`.`id` = `ISCR`.`id_user` WHERE `ISCR`.`id_gara` IS '' AND `ISCR`.`id_user` IS '';
I have always back
Could be a bug?
thanks
Francesco
also with this code I have always the same error about the apexes:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''' AND `ISCR`.`id_user` IS ''' at line 1 SQL=SELECT COUNT(`USRS`.`id`) AS `USRS.count` FROM `#__users` AS `USRS` LEFT JOIN `#__chronoforms_iscrizione_gara` AS `ISCR` ON `USRS`.`id` = `ISCR`.`id_user` WHERE `ISCR`.`id_gara` IS '' AND `ISCR`.`id_user` IS '';
I have always back
WHERE model.field IS ''
but i need of WHERE model.field IS NULL
.
Could be a bug?
thanks
Francesco
Hi Francesco,
Yes, i have just found a small glitch in the code which may be causing this, please send me a message using the "contact us" page to get a patch file.
Best regards,
Max
Yes, i have just found a small glitch in the code which may be causing this, please send me a message using the "contact us" page to get a patch file.
Best regards,
Max
With the patch file and this code in where condition section work perfectly!
thx
Francesco
model.field/is:{value:null}
thx
Francesco
This topic is locked and no more replies can be posted.