Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143
This is the forum to discuss the Wrox book Beginning PHP 6, Apache, MySQL 6 Web Development by Timothy Boronczyk, Elizabeth Naramore, Jason Gerner, Yann Le Scouarnec, Jeremy Stolz; ISBN: 9780470391143
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning PHP 6, Apache, MySQL 6 Web Development ISBN: 9780470391143 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old March 13th, 2009, 05:13 PM
Authorized User
 
Join Date: Mar 2009
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Default getting MySQL error msg when Updating info in a database

Column was set to data type implicit default; NULL supplied for NOT NULL column 'adults' at row 1

thats what I am getting when i click submit button, it dont even go to the next page.

<tr>
<td bordercolor="#FFFFFF"><div align="right">Number of Adults: </div></td>
<td bordercolor="#FFFFFF"><select name="adults">
<option value="1" <?php if (!(strcmp(1, $row_rsBooking['adults']))) {echo "selected=\"selected\"";} ?>>1</option>
<option value="2" <?php if (!(strcmp(2, $row_rsBooking['adults']))) {echo "selected=\"selected\"";} ?>>2</option>
</select></td>
</tr>
<tr>
<td bordercolor="#FFFFFF"><div align="right">Number of Children: </div></td>
<td bordercolor="#FFFFFF"><select name="children">
<option value="0" <?php if (!(strcmp(0, $row_rsBooking['children']))) {echo "selected=\"selected\"";} ?>>0</option>
<option value="1" <?php if (!(strcmp(1, $row_rsBooking['children']))) {echo "selected=\"selected\"";} ?>>1</option>
<option value="2" <?php if (!(strcmp(2, $row_rsBooking['children']))) {echo "selected=\"selected\"";} ?>>2</option>
</select></td>
</tr>



Last edited by Igor Astakhov; March 13th, 2009 at 11:33 PM..
  #2 (permalink)  
Old March 13th, 2009, 06:03 PM
Authorized User
 
Join Date: Mar 2009
Posts: 11
Thanks: 1
Thanked 0 Times in 0 Posts
Default

i figured out that it has something to do with the "adults" menu and "children" menu for some reason the data from the database is not entering the menus i cant put my finger on it why specifically its not catching it. ive tried changing the code in different ways and yet still nothing.... any suggestions why it doesnt recieve the data from the db?



BLah figured it out for somereason when you use dynamic data in dreamweaver to insert values into menus with integers it doesnt put the values in so therefor you have to go and edit the code manually and put the correct values in like mine that i edited above, ill outline it

Last edited by Igor Astakhov; March 13th, 2009 at 06:15 PM..


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch1 MySQL returns Error 1046: No database selected aiche_ag BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 October 1st, 2007 02:47 PM
IMPORTANT MySQL my.cnf info ElizabethN BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 11 June 27th, 2005 05:22 PM
Need info about MySQL bmains MySQL 3 September 23rd, 2004 07:18 AM
Automatically retrieval info from MySql Master_D Pro PHP 1 June 5th, 2004 05:08 PM
Display a msg when waiting 4 output from database Sach Classic ASP Basics 2 April 29th, 2004 08:24 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.