To simulate the problem in an environment that I can read the DB query log, I joined a different plan in the same web hosting service provider. This plan is called Managed VPS (let's called it planB as opposed to the shared web hosting let's call say it planA). Th planA is having the programA that cannot fetch data from a view in MySQL DB. (see http://www.bbrclubhk.com/testdb/testdb.html)
So, I installed the same programA to planB (let's call this programB) and I enabled DB query log in planB. When I execute programB in planB, I expected to see the same problem. But, to my surprise, all view data are retrieved. (see http://www.hkcnau.com/testdb/testdb.html). I thought the problem is solved if I switch to a more expensive environment - Managed VPS vs shared web hosting. But still, I don't understand why it works. Subsequently, I installed the real program (propgramC) to this planB (Managed VPS) and expect to launch it for my users. But, problem of the same nature occurred that one of the table data (table data not view data) is unable to be fetched. This is telling me that problem does not lie in view data nor the security issue of the view. So, I enable the DB query log. Below is the log. Please note that 2020-02-07T13:40:58.798502Z, there is no Prepare and Execute. This Connect is where the php connect that table data. Obviously that table data SELECT was skipped. 2020-02-07T13:40:58.384118Z 616 Connect d...@hkcnau.hkcnau.com on dwu_bookclub using TCP/IP 2020-02-07T13:40:58.384298Z 616 Query SET NAMES utf8 2020-02-07T13:40:58.384502Z 616 Prepare SELECT DISTINCT intQuizYear, txtQuizLevel, txtSchoolCode FROM score 2020-02-07T13:40:58.384582Z 616 Execute SELECT DISTINCT intQuizYear, txtQuizLevel, txtSchoolCode FROM score 2020-02-07T13:40:58.385643Z 616 Quit 2020-02-07T13:40:58.446744Z 617 Connect d...@hkcnau.hkcnau.com on dwu_bookclub using TCP/IP 2020-02-07T13:40:58.446953Z 617 Query SET NAMES utf8 2020-02-07T13:40:58.447160Z 617 Prepare SELECT * FROM score 2020-02-07T13:40:58.447245Z 617 Execute SELECT * FROM score 2020-02-07T13:40:58.449551Z 617 Quit 2020-02-07T13:40:58.798274Z 618 Connect d...@hkcnau.hkcnau.com on dwu_bookclub using TCP/IP 2020-02-07T13:40:58.798502Z 618 Query SET NAMES utf8 2020-02-07T13:40:58.800083Z 618 Quit To prove the real program (programC) has no bug, I installed this programC into planA. And, to my surprise, the table data can all be retrieved but a different view data is not fetched. Really puzzled me. Am willing to supply the cPanel password to anyone who wished to go deeper to find out the problem. Please private message me at dw1...@gmail.com Stuck in this problem for quite and hope to solve it asap. David -- Sent from: http://apache-flex-users.2333346.n4.nabble.com/