farshidtm
سه شنبه 05 مرداد 1389, 03:22 صبح
سلام عليكم خسته نباشيد :لبخند: آقا يه سوال يعني يه كمك
اين يه تيكه كد پايين كه مشاهده ميكنيد
$search=mysql_query("select count(Id) from `news` where `Name` Like '$Title' ") or die(mysql_error());
if(mysql_result($search,0)==0){
$insert=mysql_query("insert into `news` values (null,'MdPortal','".$Title."','".str_ireplace(" ","-",$Title)."','".$body."','3','1','1',UNIX_TIMESTAMP(),'ON')")or die(mysql_error());
}
}
آره همين اين كد اولي هست كه درست كار مي كنه حالا من مي خوام اطلاعات اينو بريزم تو
`wp_posts` WHERE 1`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`
اينها
:d
تا يه جاهايي هم پيش رفتم ولي اونقدر درست بلد نيستم ميشه كمك كنيد ؟
مي خوام اينجوري بشه
$search=mysql_query("select count(Id) from `wp_posts` where `post_title` Like '$Title' ") or die(mysql_error());
if(mysql_result($search,0)==0){
$insert=mysql_query("insert into `news` values (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`)")or die(mysql_error());
}
}
البته اين خرابه اين اررو ميده
Column count doesn't match value count at row 1
ممنون اگه بتونيد راهنمايي كنيد
اين يه تيكه كد پايين كه مشاهده ميكنيد
$search=mysql_query("select count(Id) from `news` where `Name` Like '$Title' ") or die(mysql_error());
if(mysql_result($search,0)==0){
$insert=mysql_query("insert into `news` values (null,'MdPortal','".$Title."','".str_ireplace(" ","-",$Title)."','".$body."','3','1','1',UNIX_TIMESTAMP(),'ON')")or die(mysql_error());
}
}
آره همين اين كد اولي هست كه درست كار مي كنه حالا من مي خوام اطلاعات اينو بريزم تو
`wp_posts` WHERE 1`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`
اينها
:d
تا يه جاهايي هم پيش رفتم ولي اونقدر درست بلد نيستم ميشه كمك كنيد ؟
مي خوام اينجوري بشه
$search=mysql_query("select count(Id) from `wp_posts` where `post_title` Like '$Title' ") or die(mysql_error());
if(mysql_result($search,0)==0){
$insert=mysql_query("insert into `news` values (`ID`, `post_author`, `post_date`, `post_date_gmt`, `post_content`, `post_title`, `post_excerpt`, `post_status`, `comment_status`, `ping_status`, `post_password`, `post_name`, `to_ping`, `pinged`, `post_modified`, `post_modified_gmt`, `post_content_filtered`, `post_parent`, `guid`, `menu_order`, `post_type`, `post_mime_type`, `comment_count`)")or die(mysql_error());
}
}
البته اين خرابه اين اررو ميده
Column count doesn't match value count at row 1
ممنون اگه بتونيد راهنمايي كنيد