Author |
Message |
Guardian2003
Site Admin

Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Sat Dec 23, 2006 5:36 pm |
|
Try changing this section of code to whats posted here
Code:
while($i>0) {
//echo "$file_names[$i]<br>";
$title = eregi_replace("(.+)(\.)(.+)","\\1",$file_names[$i]);
$url = $url_downloads_folder.$file_names[$i];
$the_sql_querys .= "insert into ".$prefix."_downloads_downloads values
(NULL, '$cat', '0', '$title', '$url', '$description', now(), '$name', '$email',
'$the_hits','$name','0.0000','0','0', '$filesize', '$version', '$homepage');<br><br>";
$i--;
}
|
|
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Sat Dec 23, 2006 9:22 pm |
|
I noticed when I copied the script from Chris' site that the second variable you change to '$name' showed as a double-quote character, which if copied directly, would likely cause a SQL error. You could change it to 2 single quotes '', but Guardian's idea of using the $name variable might be useful for descriptive purposes. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
thebishop
Worker


Joined: Aug 30, 2005
Posts: 244
Location: Flying to close to the sun
|
Posted:
Sat Dec 23, 2006 11:33 pm |
|
If this helps, Here is what jaded had to say about this.
Quote: | JadedHere is your current insert via the script and the current one via the database tables. You can see many things are missing.
|
Code:
Insert into nuke_downloads_downloads values (NULL, '2', '0', 'winmtr', 'http://www.mysite.com/homefries/downloads/PC_utilities/winmtr.exe', 'PC tools', now(), 'ThePowerCosmic', 'webmaster@mysite.com', '0','0','0','0', '0', '', 'http://www.mysite.com');
INSERT INTO `nuke_downloads_downloads` VALUES (1, 1, 0, 'dod1.3_enhancement_pack', 'http://mysite.com/homefries/dod_files/dod1.3_enhancement_pack.exe', 'the dod1.3_enhancement_pack includes an FPS & Ping booster as well as 16 custom crosshairs you can toggle through while playing,a custom VGUI for changing classes,font fixes for amxstats and also ingame wave files that have been reduced or amplified to make the game more pleasant to play.', '2006-11-24 13:41:49', 'ThePowerCosmic', 'Webmaster@mysite.com', 141, '', 0.0000, 0, 0, 13, '1.5 final', 'http://mysite.com');
|
|
|
|
|
 |
thebishop

|
Posted:
Sat Dec 23, 2006 11:43 pm |
|
kguske, Yes i'm using the fixed version of that script from chris's site.
ravens site will not let me post the code from the script.  |
|
|
|
 |
thebishop

|
Posted:
Sat Dec 23, 2006 11:49 pm |
|
BTW, i just want to say that the help i receive from the people on this site is invaluable and I never want anyone to think that i'm just too lazy to do things for myself or to learn. believe me i really try.. So please always let me know if you feel you need to be compensated for your time. i am more then willing to pay you for your knowledge and expertise. |
Last edited by thebishop on Sun Dec 24, 2006 6:47 am; edited 1 time in total |
|
|
 |
thebishop

|
Posted:
Sat Dec 23, 2006 11:57 pm |
|
Guardian2003 wrote: | Try changing this section of code to whats posted here
Code:
while($i>0) {
//echo "$file_names[$i]<br>";
$title = eregi_replace("(.+)(\.)(.+)","\\1",$file_names[$i]);
$url = $url_downloads_folder.$file_names[$i];
$the_sql_querys .= "insert into ".$prefix."_downloads_downloads values
(NULL, '$cat', '0', '$title', '$url', '$description', now(), '$name', '$email',
'$the_hits','$name','0.0000','0','0', '$filesize', '$version', '$homepage');<br><br>";
$i--;
}
| |
Ok i added that code and tried it and got the same error.
"#1136 - Column count doesn't match value count at row 1"
EDIT it did work but mysql gave me that error anyway. see post below. |
Last edited by thebishop on Sun Dec 24, 2006 6:50 am; edited 3 times in total |
|
|
 |
Guardian2003

|
Posted:
Sun Dec 24, 2006 5:11 am |
|
Hmm.
OK can you email me the file you are using to webmaster AT code-authors DOT com I'll see if I can take a look at it before I have to go out. |
|
|
|
 |
thebishop

|
Posted:
Sun Dec 24, 2006 6:45 am |
|
Ok i thought this had not worked because mySQL barked an error at me and did not say SUCCESS. so my first email to you had the original script, then after noticing my two new downloads on my site I remailed you the script with the edit you posted above. |
|
|
|
 |
thebishop

|
Posted:
Fri Jan 12, 2007 4:16 am |
|
I tested this script the other day and added 271 new downloads in under two minutes. The script now works great. it's a breeze to add a ton of downloads now. |
Last edited by thebishop on Fri Jan 12, 2007 1:47 pm; edited 1 time in total |
|
|
 |
jaded
Theme Guru

Joined: Nov 01, 2003
Posts: 1006
|
Posted:
Fri Jan 12, 2007 8:25 am |
|
|
|
 |
thebishop

|
Posted:
Fri Jan 12, 2007 2:45 pm |
|
this script now works for Nuke 7.6-3.3.
heres the link to download the downloadadd.php script for inserting a ton of downloads all at once. Only registered users can see links on this board! Get registered or login! |
Last edited by thebishop on Sun Jan 28, 2007 1:07 pm; edited 2 times in total |
|
|
 |
jaded

|
Posted:
Fri Jan 12, 2007 2:48 pm |
|
thank you very much. i am glad it finally got working! |
|
|
|
 |
thebishop

|
Posted:
Fri Jan 12, 2007 7:23 pm |
|
Chatserv got it working for me, i just created the .htaccess file and the new readme because there wasn't really any instructions for it except in the nuke how too. |
|
|
|
 |
|