All pastes #389028 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-03-10 13:48 UTC
rendered paste body
<?
include("includes/cons.php");

$q="select id from stores";
$r=mysql_query($q);
while ($row = mysql_fetch_array($r)){

$id = $row['id'];
#$whatami = substr($id, -1, 1);
#$iam= ord($whatami);

$id2=str_replace(chr(13), "", $id);


$q2="update store set id='$id2' where id='$id'";
$r2=mysql_query($q2);

echo "Updated $id to: $id2<br>";

#echo "I am : $iam<br>";
}

?>