<?php Third, the following preparation side read a write operation! while (! $rs->eof) { $f = $rs->fields (1); 1. Assign Value (* Debugging use) Echo $f->value; 2. See if you can read it (* Debug) The following is assigned to the variable value, where ' gb2312 ', ' utf-8 ' to solve the garbled problem! $id = Iconv (' gb2312 ', ' utf-8 ', $rs->fields (ID)->value); ID is an access field, or it is represented by a number $name = Iconv (' gb2312 ', ' utf-8 ', $rs->fields (title)->value); $jianjie = Iconv (' gb2312 ', ' utf-8 ', $rs->fields (1)->value); $content = Iconv (' gb2312 ', ' utf-8 ', $rs->fields (content)->value); $down = Iconv (' gb2312 ', ' utf-8 ', $rs->fields (download)->value); echo "<font color=red>". $name. " </font> already inserted <br> "; Output Insert Record The insert is executed sequentially, and the value is a variable $sql = "INSERT into ' Shopex '. ' Sdb_articles ' (' article_id ', ' node_id ', ' title ', ' content ', ' uptime ', ' ifpub ', ' align ', ') ' FileType ', ' filename ', ' orderlist ', ' disabled ') VALUES (', ' {$fenlei} ', ' {$name} ', ' {$info} ', ' 1275549287 ', ' 1 ', Null, Null,null,null, ' false ') "; The above is the SQL inserted into the MySQL database mysql_query ($sql); Execute the Statement! echo $rs->fields (name)->value. "<br>"; $rs->movenext (); Personal use for access to convert a database within MySQL } ?> |