Re: Query stopping after 2 records?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 27, 2009 at 10:19 AM, Miller, Terion <
tmiller@xxxxxxxxxxxxxxxxxxxx> wrote:

> I need help/advice figuring out why my query dies after 2 records.  Here is
> the query:
>
>         // Build your INSERT statement here
>
>
>  $query = "INSERT into `warrants` (wid, name, age, warrant, bond, wnumber,
> crime) VALUES (";
>    $query .= " '$wid', '$name', '$age', '$warrant',
> '$bond', '$wnumber', '$crime' )";
>        $wid = mysql_insert_id();
>
> // run query
>
>  mysql_query($query) or die ("GRRRRRRR");
>
>
>  echo $query;
>
> It inserts two records and dies half way thru the 3rd?
> Thanks in advance for clues to fix this.
> T.Miller
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
echo out each sql statement and then change the or die to

mysql_query($query) or die (mysql_error());
-- 

Bastien

Cat, the other other white meat

[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux