Jump to content


Photo

Duplicating modules in phpnuke


  • Please log in to reply
5 replies to this topic

#1 systemtek

systemtek
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 11 August 2006 - 12:03 PM

I am using phpnuke and i have read in the manual about Duplicating the PHP-Nuke FAQ module, this is section 22.1. 

Here : http://www.karakas-o...faq-module.html

This is just what i need to do, but reading about it, it says about doing stuff from the command line to the MySQL.

I dont have command line access i just have mysql and phpnuke via cPanel, do i need to do any of that, if so how do i go about doing it as dont have ssh access.

Are the files anywhere i acn access them ?

Thanks

#2 xAtlas

xAtlas
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 11 August 2006 - 02:32 PM

I am using phpnuke and i have read in the manual about Duplicating the PHP-Nuke FAQ module, this is section 22.1. 

Here : http://www.karakas-o...faq-module.html

This is just what i need to do, but reading about it, it says about doing stuff from the command line to the MySQL.

I dont have command line access i just have mysql and phpnuke via cPanel, do i need to do any of that, if so how do i go about doing it as dont have ssh access.

Are the files anywhere i acn access them ?

Thanks


Looks like you can just run the following in from the SQL tab in phpMyAdmin and it'll create the 2 tables in your database - which means you can skip the MySQL Prompt portion. So do the following:

copy the below code. Open phpMyAdmin and select your phpnuke databaes. Click on the SQL tab and paste the code in the RUN SQL QUERY window and click GO. That'll create the 2 tables that you need.

# 
# Table structure for table `nuke_faqAnswer2`
# 
  
CREATE TABLE nuke_faqAnswer2 (
  id tinyint(4) NOT NULL auto_increment,
  id_cat tinyint(4) NOT NULL default '0',
  question varchar(255) default ",
  answer text,
  PRIMARY KEY  (id),
  KEY id (id), 
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `nuke_faqAnswer2`
#
# --------------------------------------------------------
#
# Table structure for table `nuke_faqCategories2`
#
CREATE TABLE nuke_faqCategories2 (
  id_cat tinyint(3) NOT NULL auto_increment,
  categories varchar(255) default NULL,
  flanguage varchar(30) NOT NULL default ",
  PRIMARY KEY  (id_cat),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `nuke_faqCategories2`
#
# --------------------------------------------------------


#3 systemtek

systemtek
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 11 August 2006 - 08:08 PM

Hi thanks for the reply, tried as suggested and get the following error

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key

Any ideas ?

Here is my code i just changed it and called it products :

#
# Table structure for table `nuke_products`
#
 
CREATE TABLE nuke_products (
  id tinyint(4) NOT NULL auto_increment,
  id_cat tinyint(4) NOT NULL default '0',
  question varchar(255) default ",
  answer text,
  PRIMARY KEY  (id),
  KEY id (id),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `nuke_products`
#
# --------------------------------------------------------
#
# Table structure for table `nuke_products`
#
CREATE TABLE nuke_products (
  id_cat tinyint(3) NOT NULL auto_increment,
  categories varchar(255) default NULL,
  flanguage varchar(30) NOT NULL default ",
  PRIMARY KEY  (id_cat),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `products`
#
# --------------------------------------------------------

#4 xAtlas

xAtlas
  • Members
  • PipPip
  • Member
  • 18 posts

Posted 11 August 2006 - 08:28 PM

no. they changed the table names by adding a "2" to the end of the table name in the code that I posted.

In the faq2.php files, they will query those 2 tables by the table names. Try using the code posted as is.

#5 systemtek

systemtek
  • Members
  • PipPip
  • Member
  • 12 posts

Posted 11 August 2006 - 09:02 PM

same error

#1075 - Incorrect table definition; there can be only one auto column and it must be defined as a key



#6 bluerace

bluerace
  • New Members
  • Pip
  • Newbie
  • 5 posts

Posted 25 April 2009 - 06:39 AM

In your code,

CREATE TABLE nuke_products (
  id tinyint(4) NOT NULL auto_increment,
  id_cat tinyint(4) NOT NULL default '0',
  question varchar(255) default ",
  answer text,
  PRIMARY KEY  (id),
  KEY id (id),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `nuke_products`
#
# --------------------------------------------------------
#
# Table structure for table `nuke_products`
#
CREATE TABLE nuke_products (
  id_cat tinyint(3) NOT NULL auto_increment,
  categories varchar(255) default NULL,
  flanguage varchar(30) NOT NULL default ",
  PRIMARY KEY  (id_cat),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `products`
#
# --------------------------------------------------------

the table names you are creating are SAME!!
add 2 to the end of the second table name.

like this:

CREATE TABLE nuke_products (
  id tinyint(4) NOT NULL auto_increment,
  id_cat tinyint(4) NOT NULL default '0',
  question varchar(255) default ",
  answer text,
  PRIMARY KEY  (id),
  KEY id (id),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `nuke_products`
#
# --------------------------------------------------------
#
# Table structure for table `nuke_products`
#
CREATE TABLE nuke_products2 (
  id_cat tinyint(3) NOT NULL auto_increment,
  categories varchar(255) default NULL,
  flanguage varchar(30) NOT NULL default ",
  PRIMARY KEY  (id_cat),
  KEY id_cat (id_cat)
) TYPE=MyISAM;
#
# Dumping data for table `products`
#
# --------------------------------------------------------

Karkas guide is not good because it is so out-of-dated.
That doesn't help you a lot and most of nuke persons.
Make PHP-NUKE smarts: The Home of Enterprise PHP-NUKE and phpBB3ToNuke




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users