PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
joedunn
New Member
New Member


Joined: Oct 26, 2003
Posts: 6

PostPosted: Sun Oct 26, 2003 4:48 pm Reply with quote Back to top

Everything was progressing perfectly until the last step. When I get this error:

Welcome to the KISSQ MySQL Table Installer!

Unable to Create the table.

Column 'pDate' is used with UNIQUE or INDEX but is not defined as NOT NULL


What have I done wrong? I did search the forum for an answer first.

Thank you,

Joe Dunn
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15057
Location: Kansas

PostPosted: Tue Oct 28, 2003 7:05 am Reply with quote Back to top

I know many PN sites use this w/o any problem. What version of MySQL are you running? You should be able to have a NULL column on an index.

You could try this. In kissq-sql.php find this code
Code:
pDate varchar(10) default NULL
and modify it to
Code:
pDate varchar(10) default NOT NULL
Then try install again. Even if that works, the application may not because the application does not exepect to have a value for purchase date. I'm just trying to determine if it's your version of MySQL.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
joedunn
New Member
New Member


Joined: Oct 26, 2003
Posts: 6

PostPosted: Wed Oct 29, 2003 7:40 pm Reply with quote Back to top

My server has MySQL 3.22.32

Joe Dunn
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15057
Location: Kansas

PostPosted: Wed Oct 29, 2003 8:27 pm Reply with quote Back to top

Well, they're on 3.23.58. Can you upgrade? You could look at the change logs on mysql.com to see if that was changed, which I expect it was.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
joedunn
New Member
New Member


Joined: Oct 26, 2003
Posts: 6

PostPosted: Fri Oct 31, 2003 3:30 pm Reply with quote Back to top

Thankfully, a more intelligent friend of mine discovered and fixed the problem. I would email or attach the file but it does not seem possible on this forum. Here is the solution, at least for PN 726 users:

The problem was in the code used to create the tables - there was a syntax error.

This code: pDate varchar(10) default NULL,
Should be: pDate varchar(10) NOT NULL default '',

In the file kissq-sql.php you will want to replace line 130 with:

$query = "CREATE TABLE kissq_portfolio (UID varchar(16) NOT NULL default '', Symbol varchar(16) NOT NULL default '', nShares mediumint(9) default '0', pPrice decimal(11,5) unsigned NOT NULL default '0.00000', fees varchar(11) default NULL, uniqueid int(10) unsigned NOT NULL auto_increment, pDate varchar(10) NOT NULL default '', UNIQUE KEY UID (UID,Symbol,uniqueid), KEY pDate (pDate), KEY uniqueid (uniqueid)) TYPE=MyISAM";
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 15057
Location: Kansas

PostPosted: Fri Oct 31, 2003 3:59 pm Reply with quote Back to top

As I said in my email to you, that may resolve the issue with your installation because of the version of either MySQL or phpMyAdmin. But the point is, is that it is supposed to be NULL and it works on hundreds of other installs. That's why I believe it may be your version of MySQL or phpMyAdmin.

I just tested this on my system using the original query
Code:

CREATE TABLE kissq_portfolio (UID varchar(16) NOT NULL default '', Symbol varchar(16) NOT NULL default '', nShares mediumint(9) default '0', pPrice decimal(11,5) unsigned NOT NULL default '0.00000', fees varchar(11) default NULL, uniqueid int(10) unsigned NOT NULL auto_increment, pDate varchar(10) default NULL, UNIQUE KEY UID (UID,Symbol,uniqueid), KEY pDate (pDate), KEY uniqueid (uniqueid)) TYPE=MyISAM;

and it installed perfectly
Code:

Your SQL-query has been executed successfully (Query took 0.0067 sec)
 
SQL-query : [Edit] [Create PHP Code]
CREATE TABLE kissq_portfolio(
UID varchar( 16 ) NOT NULL default '',
Symbol varchar( 16 ) NOT NULL default '',
nShares mediumint( 9 ) default '0',
pPrice decimal( 11, 5 ) unsigned NOT NULL default '0.00000',
fees varchar( 11 ) default NULL ,
uniqueid int( 10 ) unsigned NOT NULL AUTO_INCREMENT ,
pDate varchar( 10 ) default NULL ,
UNIQUE KEY UID( UID, Symbol, uniqueid ) ,
KEY pDate( pDate ) ,
KEY uniqueid( uniqueid )
) TYPE = MYISAM

So, the query and file are correct as distributed. You have altered it to work with your system, but it should not be required.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum