PHP & MySQL -> Field Title

From: Date: Mon, 30 Apr 2007 05:47:33 +0000
Subject: PHP & MySQL -> Field Title
Groups: php.general 
Request: Send a blank email to php-general+get-254135@lists.php.net to get a copy of this message
Good Morning guys and girls As I am rather lazy, I don't wanna do a data readout on my MySQL table in the following way with mysql_fetch_assoc()
$data_item1    =    $data['xitem1'];
$data_item2    =    $data['yitem2];
.... I am trying to do the following: I have the correct number of fields in the table, which is 116. Now I want to use a for-loop and read teh data into a string, then shove it into another table, which has the exact same layout. I was thinking about something like for($i=0; $i<= 115; $i++) {
   $data_item[$i]    =    $data[$i];
} but now I have the problem with the field names and all... can someone point me into the right direction? All I have to so is move the contents of one field to the second database wich has the same layout as the first DB. Would be thankful for any help :o) Cheers! Chris

« previous php.general (#254135) next »