// لقد عدلت في الموضوع تم حل المشكلة غيرت اسم الداتابيز وبدأته من جديد والمشكلة اتحلت الحمد لله
كتبت هذا الكود لانشاء جدولين
تم انشاء الاول فقط
لماذا؟
<?php
$link=mysql_connect("localhost","root");
if (!$link)
{
die ("cannot link to the database".mysql_error());
}
echo "connected successfully";
$query="CREATE DATABASE IF NOT EXISTS newwork";
$result= mysql_query($query);
if(!$result){
die ('cannot create the database'.mysql_error());
}
else
echo "database created successfully";
$result='';
$query='';
$query="CREATE TABLE vote_categoryvideo (
`categoryID` int(1) NOT NULL auto_increment,
`category` varchar(255) NOT NULL default '',
`parent_category` int(1) default NULL,
`type` int(1) default '0',
PRIMARY KEY (`categoryID`))";
mysql_select_db("newwork",$link);
$result=mysql_query($query,$link);
if(!$result)
{
echo"DB Error ,could not query the database\n";
echo'MySQL Error: '.mysql_error();
exit;
}else
echo" the table contact is created sucessfully ";
$result='';
$query='';
$query="CREATE TABLE videodownload (
`id` int(11) NOT NULL auto_increment,
`name` varchar(255) NOT NULL default '',
`soundpath` varchar(255) NOT NULL default '',
`size` double NOT NULL default '0',
`type` varchar(255) NOT NULL default '',
`date` date default NULL,
`categoryID` int(1) default '0',
PRIMARY KEY (`id`))";
mysql_select_db("newwork",$link);
$result=mysql_query($query,$link);
if(!$result)
{
echo"DB Error ,could not query the database\n";
echo'MySQL Error: '.mysql_error();
exit;
}else
echo" the table contact is created sucessfully ";
$result='';
$query='';
?>