DMXzone Server Connect Support Product Page

Solved

MySQL 'View' will not show data

Reported 30 Mar 2019 13:58:04
1
has this problem
30 Mar 2019 13:58:04 Charles Knight posted:
Hi have asked this via PM and not had a satisfactory answer to whats seems to be a problem with Server Connect and its inability to show records from a MySQL database View.

I sent the DMX Team some live examples over three weeks ago and as of now no-one has bothered to reply!

Looking forward to getting this sorted as this fault is now holding my project up.

CK

Replies

Replied 01 Apr 2019 07:07:51
01 Apr 2019 07:07:51 Teodor Kuduschiev replied:
Hi Charlie,

Unfortunatley we have not received any live examples you sent.
There shouldn't be an issue returning records from a mysql view - many of our users are using views actually. Can you please read this article and check for errors: www.dmxzone.com/go/32354/debugging-problems-in-dmxzone-server-connect/
Replied 01 Apr 2019 09:16:56
01 Apr 2019 09:16:56 Charles Knight replied:
Hi Teodor

I did send you these test pages several weeks ago, here they are again, as you can see when I use the View to return records I get nothing:

www.antinol.com.au/test/using-dmx-app-connect-query-view.php

www.antinol.com.au/test/using-dw-dbconnection.php

www.antinol.com.au/test/using-dmx-app-connect-query-join.php

Many thanks
CK
Replied 01 Apr 2019 09:40:38
01 Apr 2019 09:40:38 Teodor Kuduschiev replied:
Have you followed the steps in the tutorial i sent you, so you can see the EXACT error message returned when using a view?
Replied 02 Apr 2019 08:59:59
02 Apr 2019 08:59:59 Charles Knight replied:
I have enable the Debug flag in server connect and the page in question is reporting an error on the repeat, however the repeat is no different than the ones on the pages that work.

www.antinol.com.au/test/using-dmx-app-connect-query-view.php

Replied 02 Apr 2019 10:06:50
02 Apr 2019 10:06:50 Teodor Kuduschiev replied:
As explained in the tutorial, the error shown in the console is:


Quotemessage: "SQLSTATE[HY000]: General error: 1615 Prepared statement needs to be re-prepared"


prntscr.com/n6bs2n

Which is caused by a bug in PHP with older Mysql versions when using a view bugs.mysql.com/bug.php?id=42041
What is the mysql version you are currently running?
Replied 03 Apr 2019 09:37:09
03 Apr 2019 09:37:09 Charles Knight replied:
mysqlnd 5.0.11-dev - 20120503
Replied 03 Apr 2019 09:53:03
03 Apr 2019 09:53:03 Teodor Kuduschiev replied:
Not the driver, but the actual mysql server version - is it below 5.7?
Replied 03 Apr 2019 10:30:38
03 Apr 2019 10:30:38 Charles Knight replied:
Yes:

MySQL server version: 5.6.43

I take it that this version is not now supported by the latest Server connect?
Replied 03 Apr 2019 10:36:12
03 Apr 2019 10:36:12 Teodor Kuduschiev replied:
It's not server connect related, but a bug in mysql versions below 5.7
There are two solutions for this:

1. Update your server to mysql 5.7
2. Open the following file: dmxConnectLib/lib/db/Connection.php and find and replace:
PDO::ATTR_EMULATE_PREPARES => FALSE to PDO::ATTR_EMULATE_PREPARES => TRUE

Both solutions will fix this bug.
Replied 03 Apr 2019 10:40:27
03 Apr 2019 10:40:27 Charles Knight replied:
Thanks Teodor

I will forward your suggestions to the service provider I use about getting MySQL updated.

If they update to 5.7 or above do I need to do suggestion two?
Replied 03 Apr 2019 10:43:27
03 Apr 2019 10:43:27 Teodor Kuduschiev replied:
No, it's only required for versions prior 5.7, where the bug exists. They've fixed it in mysql 5.7
Replied 03 Apr 2019 10:44:55
03 Apr 2019 10:44:55 Charles Knight replied:
OK thank you for your quick reply.

Reply to this topic