Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (14 sloc) 0.614 kb
<?php
define(DB_HOST,'localhost');
define(DB_NAME,'candidatos2010');
define(DB_USER,'root');
define(DB_PASS,'');
$conn = mysql_connect(DB_HOST, DB_USER, DB_PASS) or die ("<br><br><center>Problemas ao conectar no servidor: " . mysql_error() . "</center>");
mysql_select_db(DB_NAME);
$sql = 'select * from candidatos_bens';
$q = mysql_query($sql);
while($rs = mysql_fetch_array($q)) {
$sql_temp = 'insert into candidatos_bens_temp values (' . $rs['idCandidato'] . ',' . $rs['idBem'] . ",'" . trim($rs['valor']) . "')";
mysql_query($sql_temp) or die(mysql_error().'--'. $sql_temp);
}
?>
Jump to Line
Something went wrong with that request. Please try again.