Hi,
You could be right r937. Here’s the complete code. All statements are processed as my echo’ing proves to me. But the catalog field remains empty.
Any other ideas out there?
<?php
include('misc.inc');
$connection = mysql_connect($host,$user,$password)
or die ('No connection');
$db = mysql_select_db($database,$connection)
or die ('No selection');
$query = "SELECT * FROM allbooks";
$result = mysql_query($query)
or die('mysql error ' . mysql_error() . ' in query ' . $query);
$ct1 = array('Kunst','Kinderbüchen','Literatur','Geography','Photography');
$ix = 0;
while ($row = mysql_fetch_array($result))
{
$cat = $ct1[$ix];
echo $cat,"<br>";
extract($row);
$query = "UPDATE books SET catalog='$cat'";
$result2 = mysql_query($query)
or die('mysql error ' . mysql_error() . ' in query ' . $query);
echo $catalog,"<br>";
echo $ix,"<br>";
$ix++;
if ($ix == 5)
$ix = 0;
};
exit;
?>