Re: web script doesn't work on update of database
| From: | John W. Holmes | Date: | Tue, 27 Apr 2004 15:35:18 +0000 |
| Subject: | Re: web script doesn't work on update of database | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-184770@lists.php.net to get a copy of this message | ||
From: "Chip Wiegand" <chip.wiegand@simrad.com>
> "John W. Holmes" <holmes072000@charter.net> wrote on 04/27/2004 08:03:58
> > From: "Chip Wiegand" <chip.wiegand@simrad.com>
> >
> > > I make any change or no
> > > change and the data in 3 particular fields (e_month, e_day, e_year) is
> > > always reset to zeros.
> > [snip]
> > > // update the database record
> > > $result = mysql_query("update $database_table
> > > set month='$month', day='$day', year='$year',
> e_month='$emonth',
> > > e_day='$eday', e_year='$eyear', venue='$venue',
> > > location='$location',
> > > details='$details', artist_id='$the_artist_id'
> > > where show_id = '$the_id'",$db)
> > > or die_now("<h2>Could not change show</h2>");
> >
> > What does a print_r($_POST) show for the values submitted for month, day
> and
> > year? If you print this query out to the screen, what are the values?
> >
> > ---John Holmes...
>
> Interesting -
>
> show (id='51') updated
> Array ( [artist] => 3 [month] => 4 [day] => 15 [year] => 2004 [emonth] =>
> 3 [eday] => 9 [eyear] => 2004 [venue] => One More Time [location] => not
> here [show_id] => 51 )
>
> It shows the data that I sent to the database via the form. But the
> database when viewed in phpMyAdmin shows the zeros, not the data that was
> sent.
And if you print out the query??
---John Holmes...