I have the following code which reads from sql tables that are not related to couch. These tables contain user data (basic name, email, telephone, address, city, state) that I am migrating from the old database to the new.
I am having an issue where it seems to cycle through the same query twice even though i have a limit set to 1.
Here is my code:
However inside my query log when I load the page that contains the above query code, I get two lines from the execution:
When I do a <cms:dump /> before the <cms:php> it outputs only 1 record's data which is correct.
Any help is apprecaited.
I am having an issue where it seems to cycle through the same query twice even though i have a limit set to 1.
Here is my code:
- Code: Select all
<cms:query sql="select * from users" limit='1'>
<cms:php>
file_put_contents(".query.log", "- Email: <cms:show email />".PHP_EOL , FILE_APPEND | LOCK_EX);
</cms:php>
</cms:query>
However inside my query log when I load the page that contains the above query code, I get two lines from the execution:
- Code: Select all
- Email user@domain.com
- Email user@domain.com
When I do a <cms:dump /> before the <cms:php> it outputs only 1 record's data which is correct.
Any help is apprecaited.