This topic is locked
[SOLVED]

 Creating Grid Tabs dynamically Generating Blank screen

12/30/2018 4:59:23 PM
PHPRunner General questions
M
Mark Kramer author

I set up the the Dynamic Grid- Tabs and the first time it worked perfect. During a build the program froze and crashed and from that point on no matter what I try when I enter the code for the tabs it creates a blank screen.
Here is what I tried so far:
Deleted all files in the output dir then did a full build. Deleted all files in the web server directory and uploaded all files so everything was clean and new. When I press f12 to troubleshoot the code is:
<html>

<head></head>

<body></body>

</html>
(explains the blank page)
I have reinstalled PHPrunner Enterprise (32133 x64) and rebooted the machine.... Did a scandisk just to be sure.
I am stumped.
Any ideas?

Thank you

Sergey Kornilov admin 12/30/2018

A couple of things to try

  1. If you remove your code - does the page load normally?
  2. If you create a new list page in Page Designer and remove the original list page - does the same code works?

M
Mark Kramer author 12/31/2018



A couple of things to try

  1. If you remove your code - does the page load normally?
  2. If you create a new list page in Page Designer and remove the original list page - does the same code works?


Yes to #1 It does work without the code.
No to #2 I created a new list page and deleted the original as instructed. Pasted the code back in the before event. If I delete all code and add echo("Hello"); in a loop it displays then loads normally so the php is launching. It seems the call to mysql is where it is stopping. Tried a basic script:
$sql = "select count (*) as c from 'Work Order' group by type";
$rs = CustomQuery($sql);

$data = db_fetch_array($rs);
echo "Total by Type: " . $data["c"];
With no success..

Sergey Kornilov admin 12/31/2018

Your SQL Query is incorrect, you are using single quotes instead of backticks:

$sql = "select count (*) as c from `Work Order` group by type";
M
Mark Kramer author 1/1/2019



Your SQL Query is incorrect, you are using single quotes instead of backticks:

$sql = "select count (*) as c from `Work Order` group by type";



Happy new year!
I corrected the backtick typo thoroughly checked the code but it still doesn't display anything on screen. It's as if the sql is not bring the data to the screen.

Sergey Kornilov admin 1/1/2019

Test your SQL Query manually and make sure it brings results.

M
Mark Kramer author 1/2/2019



Test your SQL Query manually and make sure it brings results.


OK so it seems that in my sql query I had the case of a field name wrong I had a lowercase instead of an upper case. It is now working as should!
Thank you for pointing me in the right direction!
The more I use Vers 10, the better I like it. It take a little getting used to, but once one get over the the learning curve it is really far superior than the earlier versions.
<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=86687&image=1&table=forumreplies' class='bbc_emoticon' alt=':rolleyes:' />