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
Display Key Fields
Windows Service crashing on one machine, not on the other
Wireless LAN , Larger Scale
Private WAN
Whats wrong with my css?
Can I define a document root in html for all the anchors on a page?
objectdatasource error typename cannot be found
Server 2008 R2 DC File Permissions
Windows could not load the installer for DiskDrive. Contact your hardware vendor for assistance.
integration used to measure population increase