Re: Help with understanding an error
| From: | Wolf | Date: | Mon, 24 Nov 2008 18:04:02 +0000 |
| Subject: | Re: Help with understanding an error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-283773@lists.php.net to get a copy of this message | ||
Bottom POST when mailing the list.
My responses inline and at the bottom
---- Terion Miller <webdev.terion@gmail.com> wrote:
> this was the code I posted that accidentally only went to Wolf:
>
> what does STFW mean?
http://www.google.com/search?q=STFW&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a
> <?php
> include("inc/dbconn_open.php");
Change the include to require (should barf faster)
<!-- SNIP -->
> $result = mysql_query ($sql);
change this to:
$result = mysql_query ($sql) or die(mysql_error());
> $row = mysql_fetch_object ($result);
>
> $sql2 = "SELECT Date_FORMAT(CreatedDate,'%m/%e/%Y %h:%i %p') AS OrderDate,
> Location, WorkOrderName, Status FROM workorders ";
> $sql2 .= "WHERE WorkOrderID='$WorkOrderID'";
> $result2 = mysql_query ($sql2);
Change this one as well to add the die statement
> $row2 = mysql_fetch_object ($result2);
>
<!-- SNIP -->
And as I said before, your error code tells you that the connection to the database is invalid.
Making the changes to the code I wrote above should point you in the right direction to get it
figured out.
Wolf