By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,913 Members | 1,317 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,913 IT Pros & Developers. It's quick & easy.

insert into problem

P: n/a
I am very new to SQL/Access, and only use it very limitedly, so
ahead of time.

I have a website that inserts data into an access database, using the
below. Basically, I've got one INSERT INTO statement that inserts
line of data into one database, and and then a php for loop that
inserts multiple lines into a database with successive INSERT INTO
statements. The for loop seems to work fine, but $statement1
sporadically fails to insert data properly into the database-- eg,
one of the values, it'll spontaneously not insert all characters. At
times, the $statement1 fails to insert into the database completely.
Any suggestion? Again, I'm not a programmer and particularly not
to SQL, so if anyone responds, please keep it simple! Thanks!
$odbc = ODBC_CONNECT('user','root','password') or die
(odbc_errormsg('Could not connect to requested data source'));
$statement1 = odbc_exec($odbc,"INSERT INTO
database1(user,sessiondate,test,score1,score2,scor e3,score4,score5)
('$username','$date','$expName','$score1','$score2 ','$score3','$score4','$s*
for ($i=0;$i<sizeof($lbl);$i++) {
$foo = explode(" ",$lbl[$i]);
$statement2 = odbc_exec($odbc,"INSERT INTO
database2(i,user,sessiondate,stimdone,response,tri aldur,acc,status)



May 10 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.