<?php
include ('dbf.php');
//$fz=mysql_query("select * from custom2 order by name ");
//while($zv=mysql_fetch_assoc($fz))
//{
//echo $zv['ip'].'sss-'.$zv['name'].'<br/>';
//	mysql_query("insert into `custom` (ip,group_p,group_p1,name)
//	VALUES	('{$zv['ip']}','خنثي','{$zv['group_p1']}','{$zv['name']}')");
//}

//$fz=mysql_query("select * from 	custom1 group by group_p1 order by ip ");
//while($zv=mysql_fetch_assoc($fz))
//{
//echo $zv['matn1'].'sss-'.$zv['matn5'].'<br/>';
//	mysql_query("insert into `custom_group` (ip,name) VALUES	('{$zv['group_p1']}','{$zv['grou_name']}')");
//}

//$fz=mysql_query("select * from `kala-kol` order by id ");
//while($zv=mysql_fetch_assoc($fz))
//{
//$nerr1=$zv['nerkh_naghd'].'0';
//$nerr2=$zv['nerkh_nonaghd'].'0';
//$nerr3=$zv['nerkh_hamkar'].'0';
//echo $nerr1.'<br/>';
////echo $zv['name'].'sss-'.$zv['ip'].'<br/>';
//	mysql_query("insert into `kala` (id,ip,barcode,name,vahed,`group_ip`,`group_name`,nerkh,nerkh2,nerkh3)
//	VALUES	('{$zv['id']}','{$zv['ip']}','{$zv['barcode']}','{$zv['name']}','{$zv['vahed']}','{$zv['group_ip']}','{$zv['group_name']}'
//	,'{$nerr1}','{$nerr2}','{$nerr3}')");
//}

$fz=mysql_query("select * from `ketab`  order by ip ");
while($zv=mysql_fetch_assoc($fz))
{
echo $zv['topic'].'sss-'.$zv['id'].'<br/>';
//	mysql_query("insert into `ketab` (id,name,writer,topic,tou1,tou2)
//	VALUES	('{$zv['id']}','{$zv['name']}','{$zv['writer']}','{$zv['topic']}','{$zv['tou1']}','{$zv['tou2']}')");

//$d='تعداد جلدها'.' '.$zv['tou2'];
$d=$zv['tou2'].'--'.$zv['tou1'];
mysql_query("update matn set book_name='{$zv['name']}' where (id='{$zv['id']}') ");
}

//$fz=mysql_query("select * from 	kala1 group by group_ip order by ip ");
//while($zv=mysql_fetch_assoc($fz))
//{
//echo $zv['matn1'].'sss-'.$zv['matn5'].'<br/>';
//	mysql_query("insert into `kala_group` (ip,name) VALUES	('{$zv['group_ip']}','{$zv['group_name']}')");
//}
?>