Closed (fixed)
Project:
Node Limit Number
Version:
5.x-1.1-2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Apr 2008 at 18:11 UTC
Updated:
7 Dec 2009 at 11:29 UTC
Jump to comment: Most recent
Comments
Comment #1
nachenko commentedThe table was not created. I can't check it now, but if you know MySQL you should check install file of the module.
Sorry for any inconveniencies.
Comment #2
Anonymous (not verified) commentedHi shawnspqr and nachenko,
the table is not created because of a MySQL syntax error. I deleted the "FIRST" keyword after "Primary First" at the end of the second line and now it works.
Best regards,
Mike
Comment #3
nachenko commentedThanks hailstorm. I fixed it and committed the change. Now, there should be a new release for tomorrow.
Comment #4
scedwar commentedI get no errors when adding a node limit - in fact, I get the ok message! However, no node limit is listed which makes sense given that there is no table created by the installer! In the log I get the following log message:
Table 'mydb_drupal.node_limitnumber_rules' doesn't exist query: SELECT * FROM node_limitnumber_rules WHERE class = 'role' in /home/user1/public_html/includes/database.mysql.inc on line 172.
I'm using the latest release, downloaded 8 hours ago.
Comment #5
nachenko commentedOK, look this code:
This is the code that creates the table in a MySQL database. Could you please execute it (remember to prefix the table name) using PHPMyAdmin or whatever and tell me what happens?
Please notice the installer only works on MySQL as I don't know the syntax for other databases.
Comment #6
gorcon commentedI'm getting the same error. When I run the SQL code directly as you suggest, I get the following error:
FYI, my MySQL version is recent (5.0.37). If you have any suggestions, I'd appreciate hearing them. Let me know if you need any more info. Thanks in advance.
Comment #7
gorcon commentedRunning the table creation SQL directly works when I remove the {} surrounding the table name.
When I directly create the node_limitnumber table using SQL -- bypassing the node_limitnumber.install script -- the module appears to work properly for me.
After removing the {} in the create table statement in the .install script, the table still does not get created when installing the module. The script drops the table properly if I uninstall the module -- with or without the {} surrounding the table name in the DROP TABLE statement.
So, while I don't have much php experience, my guess is that the MySQL syntax is correct but something is just slightly off with the php syntax involving the table creation portion of the script. Maybe this is a syntax/version issue with php? I'm running v. 5.2.4. Is the php syntax in the .install script more suitable for php4 ? Just a thought.
Comment #8
scedwar commentedI'm sorry I've not been able to return to this issue to investigate since I mentioned it, however I can confirm that our host (the very excellent HotDrupal btw) is also on the very latest stable builds of PHP and MySQL (whatever that is right now).
Comment #9
nachenko commentedFixed in 1.1.2 release.
It will be available soon. Please someone have a try.
Comment #10
gorcon commentedThe 1.1.2 release seems to be working perfectly for me. Thanks for the help.
Comment #11
nachenko commentedComment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #13
mcurry commentedI know this is marked closed, but I had to fix this in the 5.x-1.1 version I just downloaded and installed (the latest recommended 5.x release listed on the project page)
I had to use this format on my MySQL installation:
The difference? The line:
'PRIMARY_KEY' needed to be removed;
and I added:
to the end of the column definitions.
This happened on MySQL Version 5.1.30, so it seems the syntax has changed.
Should I be using a later release of the node_limitnumber module? I don't see one listed as recommended. Please advise.
Comment #14
nachenko commentedHi, grateful_drupal_user.
The 1.1.3 release should be recommended, my mistake, but I can't change it from this computer (I don't know why). You can download it here:
http://drupal.org/node/305419
Thanks for your interest on this module.