The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
SQL help....
alright....i posted this somewhere else, but now i realize it should have gone in here.....sorry, I'm new at this and just learning my way around here.....
I installed the "Member Photo Gallery" hack and to post member's photos you have to run an SQL query: INSERT INTO photogallery VALUES (xxx, 'full-photo-URL', 'thumb-photo-URL', ''); xxx is replaced by the user id of the member..... what query would you run to change a member's picture or delete it from the table? When I try to put in a different photo, this is what I get... Code:
Database error in vBulletin Control Panel 2.2.9: Invalid SQL: INSERT INTO photogallery VALUES (5, 'http://www.wb-devotions.com/avatar.php?userid=5&dateline=1060140488', 'http://www.wb-devotions.com/avatar.php?userid=5&dateline=1060140488', ''); mysql error: Duplicate entry '5' for key 1 mysql error number: 1062 |
#2
|
|||
|
|||
I don't know what that table looks like, but try
PHP Code:
|
#3
|
||||
|
||||
I would uninstall that hack and install mine, just being it is far more convienant.
(no running queries each time if you want to add a photo) https://vborg.vbsupport.ru/showthrea...threadid=49565 |
#4
|
|||
|
|||
i would suggest using Velocd's as well even though i haven't seen the code i can assure that its more proficient.
As for your sql error its because there's already a value for the 5th user. in that case you have two options... you can either update the query or you can deleted the column and then reinsert it... i don't know the specifications but if you can give me the table layout i can help you with the queries. but i would go with the third option and use Velocd's hack... regards, g-force2k2 |
#5
|
||||
|
||||
here's the query i ran to setup the table...
Code:
CREATE TABLE photogallery ( userid int(10) unsigned NOT NULL default '0', photo_full varchar(100) NOT NULL default '', photo_thumb varchar(100) NOT NULL default '', comments mediumtext NOT NULL, PRIMARY KEY (userid) ) TYPE=MyISAM; |
#6
|
|||
|
|||
hey k thanks for the info give me a minute and i'll create a file for you to use in combination with the hack...
regards, g-force2k2 |
#7
|
|||
|
|||
don't know if it will be a 100% efficient but i tested it on my localhost and no parse errors were returned...
as for its functionality let me know if i have to fix anything upload file to admin folder and then call the file by yourforumurl/admin/photoadmin.php regards, g-force2k2 |
#8
|
||||
|
||||
working like a dream! thanks alot man!!!!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|