Re: displaying database output in a table
| From: | Philip Thompson | Date: | Thu, 27 May 2010 18:16:58 +0000 |
| Subject: | Re: displaying database output in a table | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-305586@lists.php.net to get a copy of this message | ||
On May 25, 2010, at 8:27 PM, David Mehler wrote:
> Hello,
> I'm trying to display mysql database output in a formatted table. My
> problem is i'm getting a blank screen with no errors. I've got
> debugging on, and have run the cli php on this file which produces no
> errors either, but neither does it give me any output.
> My eventual goal is to select the two nearest future events to the
> current date. Having done that I want to display the name, location,
> start date, start time, and a summary. Right now though I just want to
> put all information in the database in to a table.
>
> Here's the code. Pointers welcome.
> Thanks.
> Dave.
>
> <?php
> require_once($_SERVER['DOCUMENT_ROOT'] . "/dbconnect.php");
I ran into a similar issue yesterday. Tracked it down and figured out the "required" file
did not exist. It didn't show up in my dev environment b/c I had the file. When we pushed it to
QA, the file had not been uploaded. The require_once() stops execution if the file isn't found.
Try changing it to include_once() and see if you can _any_ output.
Hope this helps.
~Philip