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
Net Use returns "System error 64 has occurred. The specified network name is no longer available."
how to save blackberry notes
Lock down SMTP on Cisco ASA Or Exchange 2007 for MXlogic (Spam Filtering)
OS X Server 10.5 and OS X Laptops Joining accounts to Open Directory?
XP 10 inbound connection limit question
Windows server 2003 terminal users unable to view png images in IE
Hyper-V P2V VM Continuous Blue Screen
export or backup from sql 2008 server to a sql 2005
How do I mount a partition in deft linux?
Display Yes/No field of a query as a checkbox