Re: Problem with mysql_fetch_array tests.
| From: | Josie Messa | Date: | Fri, 11 Apr 2008 14:18:37 +0000 |
| Subject: | Re: Problem with mysql_fetch_array tests. | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-64173@lists.php.net to get a copy of this message | ||
On Fri, Apr 11, 2008 at 1:09 PM, ed slattery <slattery@uk.ibm.com> wrote:
> This group of tests pass parameters to a main function, which pushes the
> values into a database and validates the result.
>
> Sometimes the parameters passed are something like:
> func_mysql_fetch_array($link, $engine, "TIME", @date('H:i:s'),
> @date('H:i:s'), 480);
>
> where the two calls to date give the date to push, and the date to check
> the
> response against.
>
> Since these are separate calls, sometimes you are unlucky enough to pass
> over a second between the calls, and get a different date for the
> comparison
> from the original.
>
> The test would be more reliable written as:
> $x = @date('H:i:s');
>
> func_mysql_fetch_array($link, $engine, "TIME", $x, $x, 480);
Unless anyone has any objections I'll commit this change?
>
>
>
>
> --
> PHP Quality Assurance Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>