Forums

Nested DB Read

tim92109 20 Jan, 2016
Answer
Hopefully this is a simple issue. I have a DB Read action, which is working fine. Then another inside the 'on found' section of the first DB Read. The second one works fine with no conditions. When I add this condition:

<?php return array('user_id' => '488'); ?>

It returns the record where the user_id is 488. When I put a user_id in the condition that doesn't exist, it just sits there until I get a 'maximum execution time exceeded' error. There should be times when there is no result... is that an issue with the conditions field? Or is it an issue because it's nested inside another DB read action maybe?

UPDATE: I just tried 'un-nesting' the DB Read actions. It seems to still be an issue if the DB Read doesn't produce at least one result. Actually, now I feel like an idiot haha. I throw that 'event loop' into the fail spot unconsciously. I knew it was stuck in a loop but didn't look at that fail action (event loop) until just now. Removing that resolved my issue.

I'll still post this just in case anyone else is as non-observant as me and does the same thing.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger