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
Droid Incredible Exchange Synchronization
How to get rid of dirty shut down state when recovering edb file
Can I write a script to generate another script
Why are Outlook 2007 drafts disappearing?
Cast Question for Crystal Reports
Blackberry not receiving new email
"one or more multiply defined symbols found" Error in VS C++ 2010
Black screen of death upon turning PC On
Quality Center
How to remove automatic login from Outlook 2010