We spend a lot of the working time with this blog in a “what we’d describe as” a …
Javascript mindset
… which “we’d describe as” …
This optimistic, and can be chaotic for choice, “anything’s possible”, but is “syntactically logical”, mindset, where Javascript is this “sponge of the Internet” not missing out on anything?! Sound familiar?! Huh?!
With yesterday’s WordPress Same Action Item Tutorial though, we got a bit of a lesson bringing that “Javascript mindset” into an issue where “MySql SQL” was the duck doing all the paddling coming up with a solution to that “Same Cut to the Chase Action Item” dropdown idea.
We found out, probably four hours later …
Regarding MySql SQL work (which we debug and “live in” the great incredible stupendous phpMyAdmin environment wooooorrrrlllllldddd regarding) just because an SQL statement looks “syntactically logical” does not always guarantee success.
Take a look at …
| What did not work | Error Message |
|---|---|
|
MySQL returned an empty result set (ie. zero rows). (Query took 5.8648 seconds). |
| Versus what did work | |
|
|
… as a case in point?! We tried this ask (can mysql sql return zero rows just because of the overly complex where clause?) of Google to try to find out why, regarding “relative database” mindsets this might be so …
Yes, a complex WHERE clause in MySQL can cause a query to return zero rows if it inadvertently filters out all data. This often happens due to logical errors, such as conflicting conditions, NULL values treated as equal to other values, or using NOT IN with subqueries that include NULL.
Interesting, huh?!
Perhaps the KISS principle should apply here, especially if you are doing MySql SQL outside the original indexing database design thoughts ( as we were needing to use here with the MySql SQL function SUBSTRING ). Also, if we’re into the “blame game” here, question whether a solution you are achieving is inefficient, and wasteful, before applying it as your final offering!
If this was interesting you may be interested in this too.


