If you find yourself laboriously building SQL queries by typing each field = 'value' statement... think again. Imagine this: PLAIN TEXT PHP: $sql_query = mysql_query("select * from table"); $insert_elsewhere_sql = "INSERT INTO other_table SET "; while($s = mysql_fetch_assoc($sql_query)){ foreach($s as $k=>$v){ $insert_elsewhere_sql .= "$k = '$v', "; } [...]
Archive: for
Posts Tagged ‘for’
May 21, 2008
1 Comment
Categories:
Archive by date: