Microsoft
Software
Hardware
Network
Question : MySQL not inserting all fields
I have a mysql insert query in a php script. The query is as follows:
==========================
==========
==========
==========
====
$query = @mysql_query("INSERT INTO team_swimmer_registrations
(s_id, s_first_name, s_last_name, s_dob, s_site, s_group, s_family, s_season, s_season_start_unixtime, s_register_datetime, s_register_unixtime, s_billing_cycle, s_returning, s_processed , s_ip, s_host, s_agent) VALUES('0', '" .
$mysql['register_add_swimm
er' . $i . '_first_name'] . "', '" . $mysql['register_add_swimm
er' .
$i . '_last_name'] . "', '${'register_add_swimmer' . $i . '_dob2insert'}', '" .
$mysql['register_add_swimm
er_' . $i . '_site'] . "', '" . $mysql['register_add_swimm
er_' .
$i . '_group'] . "', '$this_family', '$register_season', '$register_season_start_un
ixtime', '$timestamp', '$unixtime', '$register_billing_cycle',
'0', '0', '$ip', '$visitor_host', '$agent')");
==========================
==========
==========
==========
====
The query results in the following when running the script:
==========================
==========
==========
==========
====
INSERT INTO team_swimmer_registrations
(s_id, s_first_name, s_last_name, s_dob, s_site, s_group, s_family, s_season, s_season_start_unixtime, s_register_datetime, s_register_unixtime, s_billing_cycle, s_returning, s_processed , s_ip, s_host, s_agent) VALUES('0', 'Steve', 'Bobby', '922597200', 'Triangle Aquatic Center', 'Senior', '1001', '2010 - 2011', '1283313600', '2010-08-19 23:49:35', '1282276175', 'Monthly', '0', '0', '98.26.96.48', 'cpe-098-026-096-048.nc.re
s.rr.com',
'Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.2.8) Gecko/20100722 Firefox/3.6.8')
==========================
==========
==========
==========
====
If I take the above output and run the sql via phpmyadmin it inserts all the fields in the table properly. However, when it is run from the php script it inserts all the fields EXCEPT s_site and s_group.
Any ideas?
Thanks.
Alan
Answer : MySQL not inserting all fields
CASE WHEN DATEDIFF(dd,DUE_DATE,getda
te()) < 0 Then 0 ELSE
(DATEDIFF(dd,DUE_DATE,getd
ate()) * FINE_PRICE) END AS FINE_AMOUNT,
Random Solutions
Windows Update Error on Hyper-V guest on a HP Proliant ML370 G6 (NC375i network card)
Difference between Icefaces,myfaces,richfaces
in JSF?
Exchange Mail Problem
OCS 2007 R2 and Cisco call manager
New Windows 7 workstations in existing SBS 2003 domain
HP z200 Workstation Windows 2008 R2 'PCI serial port' driver and 'PCI Simple Communications controller' driver needed
64-bit version of Acrobat PDF Add-in for Office 2010?
Offline address book cannot be downloaded after moving mailbox to exchange 2010
open Firmware
Problem with file name comparison in unix script