How do I edit SQL tables?

Discussion on a SQL Parser for EasyMOD
Locked
ham1299
Registered User
Posts: 86
Joined: Mon Sep 25, 2006 4:36 am
Contact:

Re: How do I edit SQL tables?

Post by ham1299 » Sun Oct 01, 2006 2:57 am

Can I just PM you the text from the file? Or e-mail it as an attachment?
Heather

User avatar
Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: How do I edit SQL tables?

Post by Nightrider » Sun Oct 01, 2006 3:18 am

I prefer to have a text link, but you can send it in PM if you want...

Image

ham1299
Registered User
Posts: 86
Joined: Mon Sep 25, 2006 4:36 am
Contact:

Re: How do I edit SQL tables?

Post by ham1299 » Sun Oct 01, 2006 3:35 am

I'll go ahead and PM it to you for now. If I can figure out the link thing, I'll post it here.
Heather

User avatar
Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: How do I edit SQL tables?

Post by Nightrider » Sun Oct 01, 2006 3:53 am

Ok, do this:

OPEN
viewtopic.php

FIND - Line 683-687

Code: Select all

$sql = "SELECT vd.vote_id, vd.vote_text, vd.vote_start, vd.vote_length, vd.vote_max, vd.vote_voted, vd.vote_hide, vd.vote_undo, vr.vote_result DESC, vr.vote_option_id, vr.vote_option_text, vr.vote_result
FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
WHERE vd.topic_id = $topic_id
AND vr.vote_id = vd.vote_id
ORDER BY vr.vote_result DESC,vr.vote_option_id ASC";
REPLACE WITH

Code: Select all

$sql = "SELECT vd.vote_id, vd.vote_text, vd.vote_start, vd.vote_length, vd.vote_max, vd.vote_voted, vd.vote_hide, vd.vote_undo, vr.vote_option_id, vr.vote_option_text, vr.vote_result
FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
WHERE vd.topic_id = $topic_id
AND vr.vote_id = vd.vote_id
ORDER BY vr.vote_result DESC,vr.vote_option_id ASC";
Save and upload to your phpBB folder overwriting the previous file. But before overwriting it, make sure you create a backup just in case...

Image

ham1299
Registered User
Posts: 86
Joined: Mon Sep 25, 2006 4:36 am
Contact:

Re: How do I edit SQL tables?

Post by ham1299 » Sun Oct 01, 2006 6:29 pm

OK. That sorta helped. I'm no longer getting the error notice. Thanks! :grin:

I'm not sure if you can help with this part, but it's worth trying:
Now, when I go to start a new topic, the only poll option is
"Poll Question"

There's no answer options, no buttons, etc. And, all of the options I tried to install with that Mod aren't there. Although, a poll I created earlier, when that Mod was working, does have all of the options, times two! :? Any ideas?
Heather

ham1299
Registered User
Posts: 86
Joined: Mon Sep 25, 2006 4:36 am
Contact:

Re: How do I edit SQL tables?

Post by ham1299 » Sun Oct 01, 2006 6:32 pm

OK. Here's what I see when I try to post a new topic:
Add a Poll
If you do not want to add a poll to your topic, leave the fields blank.
Poll question


In the older poll, this is what I see:
Add a Poll
If you do not want to add a poll to your topic, leave the fields blank.
Poll question
Poll option
Maximum selections Options [ Enter 1 or leave blank to allow only one selection ]
Run poll for Days Hours [ Enter 0 or leave blank for a never-ending poll ]
Hide Hide Detailed Results ( until expires )
Also Hide Simple Results (until expires)
Also Hide Number of Voters (until expires)
Undo Votes Allow users to undo/change their votes
Poll option
Maximum selections Options [ Enter 1 or leave blank to allow only one selection ]
Run poll for Days Hours [ Enter 0 or leave blank for a never-ending poll ]
Hide Hide Detailed Results ( until expires )
Also Hide Simple Results (until expires)
Also Hide Number of Voters (until expires)
Undo Votes Allow users to undo/change their votes
Delete Poll


Also, people can't actually TAKE the poll. I'm seeing:
Will I ever get this fixed?
Of course
0%
0% [ 0 ]
Not a snowball's chance in hell!
0%
0% [ 0 ]
Users Voted : 0
Total Votes : 0


If you can't help, that's fine, but I thought I'd ask.

(Thanks for the help you've given so far! :) I'm lightyears ahead of where I thought I'd be!)
Heather

User avatar
Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: How do I edit SQL tables?

Post by Nightrider » Sun Oct 01, 2006 8:41 pm

Heather, if you can restore your backups, that would immediately resolve this problem. Then we could look at the MOD script to try to determine where it might have gone wrong. I imagine that it broke a table in your posting_body.tpl file...

I could use a text link to your current posting_body.tpl file. That will probably give me an idea of what is wrong. Also, I would like to see the MOD script itself...

Image

ham1299
Registered User
Posts: 86
Joined: Mon Sep 25, 2006 4:36 am
Contact:

Re: How do I edit SQL tables?

Post by ham1299 » Sun Oct 01, 2006 8:45 pm

I still can't figure out the text link thing. :? Sorry about that. But, I'll get you the text you want to see.

One of my concerns is messing up some of my other mods in the process of fixing this one.
Heather

ham1299
Registered User
Posts: 86
Joined: Mon Sep 25, 2006 4:36 am
Contact:

Re: How do I edit SQL tables?

Post by ham1299 » Sun Oct 01, 2006 8:48 pm

Hey, I just noticed that I can attach things to PMs. Would you like me to send the appropriate files to you that way?
Heather

User avatar
Nightrider
Registered User
Posts: 7219
Joined: Tue Nov 16, 2004 8:54 pm
Location: Florida, US
Contact:

Re: How do I edit SQL tables?

Post by Nightrider » Sun Oct 01, 2006 9:13 pm

Yes, I would rather get the actual file than to see it posted here or in PM. So if you can send a file attachment, that would be perfect...

If you used EM to install the MOD, then you can use EM to Restore the Backups and none of your other installed MODs will be adversely affected. Of course you must restore backups in reverse order that the MODs were installed, FILO (First In, Last Out). So if you installed a MOD, then 5 more, you would have to restore the backups of the 5 MODs before you could restore them for the first...

Image

Locked