![]() |
Query assistance
I have Firefly's query hack installed, which is great for running querys and has helped me a lot. I just downloaded a hack but the author did not give the full query to enter and I'm a little stumped.
What's the full query to do the following? Code:
use phpMyAdmin to add a row to the user table. "then use phpmyadmin to edit 'allowmultiregs' in the settings table to change the description to:" Code:
Normally, vBulletin will stop users signing up for multiple names by checking for a cookie on the user's machine. If one exists, then the user may not sign up for additional names.<br>If you wish to allow your users to sign up for multiple names, then select yes for this option, and they will not be blocked from registering additional usernames.<br>You may track also track multiples. By using this option, the site will try to track and identify other screen names used by each member. Code:
<select name=\"setting[$setting[allowmultiregs]]\"> Syl... |
i believe filed is the column name?
if so run this query: Code:
ALTER TABLE user ADD alias varchar(250) NOT NULL |
Thanks g-force2k2. That worked. Any suggestions about the last two parts?
|
UPDATE setting SET description=your description,optioncode=your optioncode WHERE varname=allowmultiregs
|
Thanks for the tip and I got the first part done correct (the description) but I'm having a heck of a time with the next query to add the select options.
If I use the code provided in the hack (which I must add is the worst documention I've come across in all the hacks I've installed), it works. This is what the hack installer said to use: Code:
<select name=\"setting[$setting[allowmultiregs]]\"> Parse error: parse error, expecting `','' or `';'' in /mnt/web/guide/site/forum/admin/options.php(72) : eval()'d code on line 1 No modifications to options.php were ever done during the attempted install of this hack. So I figured I'd give this a shot, Code:
UPDATE setting SET optioncode '<select name=\"setting[$setting[allowmultiregs]]\"><option value=\"0\" \".iif($setting[value]==0,\"selected\",\"\").\">NO - Dont allow multiples</option><option value=\"1\" \".iif($setting[value]==1,\"selected\",\"\").\">YES - allow multiples</option><option value=\"2\" \".iif($setting[value]==2,\"selected\",\"\").">YES - but track multiples</option>' mysql error: You have an error in your SQL syntax near ''<select name=\"setting[$setting[allowmultiregs]]\"><option value=\"0\" \".iif($' at line 1 Any help would be appreciated. Syl... |
Hmmm, His code is correct...try this instead:
Code:
<select name=\\'setting[$setting[allowmultiregs]]\\'> |
Ah I'm such a n00b. I'm sorry I made you ponder your time with this. Your second suggestion did not work but your first one did. It was all me :( If you check out the code I pasted above that did not work, you'll see I forgot to add this to the query.
optioncode='select name I had optioncode 'select name No = sign. In the end, for your own curiosity, the following just worked like a charm: Code:
UPDATE setting SET optioncode='select name=\"setting[$setting[allowmultiregs]]\"> NO - Dont allow multiples YES - allow multiples YES - but track multiples ' WHERE varname='allowmultiregs' The only problem I have is this. The query ran smoothly but I'm still getting: Parse error: parse error, expecting `','' or `';'' in /mnt/web/guide/skullport/forum/admin/options.php(72) : eval()'d code on line 1 Under the Allow multiple registrations per user in the CP, which is exactly where that query would update to add the last option. Should there be a ; perhaps in the query somewhere? Syl... |
You forgot the <" in front of select...
|
Code:
UPDATE setting SET optioncode='<select name=\"setting[\$setting[allowmultiregs]]\"> regards, g-force2k2 |
Quote:
Actually it should be: Code:
UPDATE setting SET optioncode='<select name=\\"setting[\$setting[allowmultiregs]]\\"> |
All times are GMT. The time now is 03:10 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|