![]() |
![]() |
![]() ![]()
Post
#1
|
|
Grupa: Developerzy Postów: 823 Pomógł: 12 Dołączył: 18.12.2005 Ostrzeżenie: (0%) ![]() ![]() |
Zrzuciłem sobie część bazy z systemu WordPress i wyszło takie coś:
jak wklejam to sobie do phpmyadmina to wszystko pięknie, ładnie się robi, ale chciałbym zrobić to z poziomu strony:
zpaytanie jest identyczne (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) ale mysql_erroo() zwraca takie coś: Cytat You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '; INSERT INTO `wp_categories` VALUES ( 1, 'Uncategorized', 'uncategorized', '' at line 10 jak dla mnie to bardzo dziwne (IMG:http://forum.php.pl/style_emoticons/default/smile.gif) co mam zrobić? |
|
|
![]() |
![]()
Post
#2
|
|
Grupa: Moderatorzy Postów: 36 559 Pomógł: 6315 Dołączył: 27.12.2004 ![]() |
jesli to są tylko te dwa zapytania, to rob z palca (poza tym nie widze tam srednika w srodku zapytania)
Kod <?php
$query = "CREATE TABLE `wp_categories` ( `cat_ID` bigint(20) NOT NULL auto_increment, `cat_name` varchar(55) NOT NULL default '', `category_nicename` varchar(200) NOT NULL default '', `category_description` longtext NOT NULL, `category_parent` bigint(20) NOT NULL default '0', `category_count` bigint(20) NOT NULL default '0', PRIMARY KEY (`cat_ID`), KEY `category_nicename` (`category_nicename`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=2"; mysql_query($query) or die(mysql_error()); $query = "INSERT INTO `wp_categories` VALUES (1, 'Uncategorized', 'uncategorized', '', 0, 1)"; mysql_query($query) or die(mysql_error()); ?> |
|
|
![]() ![]() |
![]() |
Aktualny czas: 4.10.2025 - 23:19 |