-
Insert Array 2 Dimensional Into Database.
hello.My problem is,I want to insert the value in my array into the database. Here is my coding.(Im using PHP).
------------------------------------------------------------
for($i=5;$i<=10;$i++)
{
for($j=1;$j<5;$j++)
{
$satu[$i][$j]=$j;
}
}
for($i=5;$i<=10;$i++)
{
for($j=1;$j<5;$j++)
{
$sql="insert into sampling_parameter(mp_fldKodStesen,mp_fldKodCourse ,mp_fldWeek,mp_fldWeekActual,mp_fldKumpulan,mp_fld JenisParam,mp_fldBacaan,mp_fldResampling,mp_fldCre Time) values('$satu[$i][$j]','$satu[$i][$j]','$satu[$i][$j]','$satu[$i][$j]','$satu[$i][$j]','$satu[$i][$j]','$satu[$i][$j]','$satu[$i][$j]','$satu[$i][$j]')";
mysql_query($sql);
}
}
------------------------------------------------------------
The problem here,it is not the value in the array that are inserted into the column. It works if I use array 1 dimensional. Hope someone out there can understand my question and help me solve this problem. Thanks In advance...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|