Forum Moderators: coopster
The problem with this code is that there were multiple calls to the database. I've only allowed "$i<=10" because a larger number such as 200 would be disallowed by my hosting provider. There must be a more efficient way to write this code perhaps in straight sql code. Any help would be greatly appreciated.
<?php
$connection = mysql_connect();
$db = mysql_select_db();
for ($i=1; $i<=10; $i++){
$article_id = "/".$i.".php";
$sql = "update mortgage_define set php_name = '$article_id' where article_id='$i'";
$sql_query = mysql_query ($sql, $connection)
}
?>