in reply to Re^2: Code flow not going to while loop
in thread Code flow not going to while loop

Not printing while loop statements.

This is what you should expect if your query returns no matching rows. Use a query which you know will return a dataset first.

As you are now using placeholders (which is good) consider preparing the query outside the foreach loop. It makes no sense to re-prepare the exact same query over and over.

  • Comment on Re^3: Code flow not going to while loop

Replies are listed 'Best First'.
Re^4: Code flow not going to while loop
by dipit (Sexton) on Aug 02, 2017 at 18:15 UTC
    Man, i have run the same query in my database :p and it is running fine. Even here, if i use some select * statement, it is working fine. The datatype of these columns are 'TIMESTAMP' in my DB, may be there is some problem with that while parsing but again not sure.