<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Add A Site button errors (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Add A Site button errors
#1254
greatlife (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Add A Site button errors 2 Years ago Karma: 0  
everything works fine except "Add A Site" button, which gives this error:

Invalid query: 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 'order by RAND() LIMIT 1' at line 1


http://greatlifeinsurancegroup.com/links/directory/
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1255
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Add A Site button errors 2 Years ago Karma: 9  
line #352 of include/add.php should read . . . .

Code:

$capquery = "SELECT * FROM $tb_captcha order by RAND() LIMIT 1";
You should also have a line near the bottom of /include/config.php
Code:

$tb_captcha = 'phplinks_captcha';
If both look correct, you could try checking with PHPMyAdmin that the captcha table exists and that its name is correctly specified in the config file
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1256
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Add A Site button errors 2 Years ago Karma: 9  
PS

It looks like you have upgraded, or something. The sample entries you show are from an older version prior to the captcha routine being added, so you may need to manually create and populate the captcha table.

You'll find the neccesary queries to do that here
http://www.dew-code.com/source/?filename=./dew-newphplinks.v.2.1.0.1b.sef/docs/NewPHPLinks.sql

near the bottom

The

"CREATE TABLE IF NOT EXISTS `phplinks_captcha` ( "

query and then the following 16 queries that start with

"INSERT INTO phplinks_captcha VALUES("
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1257
greatlife (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Add A Site button errors 2 Years ago Karma: 0  
Sorry, I forgot to mention I did a manual update install on HostGator server. I went back and put my mysql data in config.php and uploaded to get that fixed, but now I am having problems manually importing phplinks_captcha.SQL table - I get a server upload error from data you provided:

Error

SQL query:

INSERT INTO `phplinks_related`
VALUES ( 1, 5, 453 ) ;

MySQL said: Documentation
#1062 - Duplicate entry '1' for key 'PRIMARY'
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1258
greatlife (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Re:Add A Site button errors 2 Years ago Karma: 0  
This file I am trying to import into MySQL database
File Attachment:
File Name: phplinks_captcha.zip
File Size: 12371
 
Report to moderator   Logged Logged  
 
Last Edit: 2010/01/19 15:34 By greatlife.
  The administrator has disabled public write access.
#1259
Dewed (Admin)
Admin
Posts: 603
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:Add A Site button errors 2 Years ago Karma: 9  
The error you mention is because the "related" table is already populated and doesn't allow duplicate entries. Also, the pre-defined related table entries are for example only and not necessary for the script to operate.

Since this is an upgrade there is no need to populate it.

You do not need to run every query from the file I linked above, only the ones related to creating the captcha table near the bottom and just below that the queries for inserting the 16 entries to the captcha table.
 
Report to moderator   Logged Logged  
 
Last Edit: 2010/01/19 16:17 By Dewed.
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008