Re: Undefinded Index on Mysql Result under Win98/PWS
| From: | mjriding at wcoil dot com | Date: | Fri, 23 Feb 2001 18:13:06 +0000 |
| Subject: | Re: Undefinded Index on Mysql Result under Win98/PWS | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41346@lists.php.net to get a copy of this message | ||
Check your php.ini file.
The line for error report is set to E_ALL by default. Change it to
E_PARSE so that minor errors (like the one you mentioned) aren't reported
to the screen.
Thanks.
On Fri, 23 Feb 2001, Greg Kopp wrote:
> I am using PHP4 + MySQL + PWS + Windows 98.
>
> We are trying to port over a web site to a laptop for remote use.
>
> However, when we execute a SQL query on a DB in which a filed of the record
> contains a NULL value, we get an error.
>
> The code is as follows:
>
> $GetQuery = mysql_query ("SELECT * FROM ApplicantsTbl WHERE App_ID = $qq");
> $AppResult = mysql_fetch_array ($GetQuery);
> $AppDOB = $AppResult[AppDOB];
>
> The query executes just fine, and PARTS of the $AppResult array get
> returned. However...
>
> We are experiencing TWO problems:
>
> First, unless we put quote marks around the index so it reads
> $AppResult['AppDOB'], we get an undefined constant. This doesn't happen on
> our Linux/Apache web server.
>
> Second, if the field AppDOB contains a NULL value, PHP barks that there is
> an undefined index. It appears that it won't even create the index.
>
> I would appreciate any help you could be.
>
> Greg
>
>
>