Bookmaker seems to have got the db_rewrite_sql issue with MySQL 5 as I'm getting an error trying to go to /bookmaker
user warning: 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 'DISTINCT(n.nid) AS nid FROM node AS n LEFT JOIN bookmaker AS bm ON n.vid=bm.vid ' at line 1 query: SELECT *, DISTINCT(n.nid) AS nid FROM node AS n LEFT JOIN bookmaker AS bm ON n.vid=bm.vid WHERE n.type='bet_offer' AND n.status=1 AND bm.closes_on>UNIX_TIMESTAMP() ORDER BY bm.closes_on ASC, n.title ASC LIMIT 0, 10
I think it is db_rewrite_sql because the query is getting rewritten from SELECT *, n.nid AS nid FROM {node} AS n to SELECT *, DISTINCT(n.nid) AS nid FROM node AS n
This problem seems to be documented in lots of places and affecting lots of modules - http://drupal.org/node/51850, http://drupal.org/node/43735, http://drupal.org/node/40623, http://drupal.org/node/70368 etc but I'm not really clear on the fix?
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | mysql-5.0.diff.txt | 1.65 KB | toddy |
Comments
Comment #1
toddy commentedHi,
thanks for the bug report. I think I've fixed this issue, but I'm not seeing the error you've reported. So I'm not sure whether the patch really fixes this bug. I'd like to ask you to apply the patch to the bookmaker module and report back to me if you're still seeing the bug. If not, I'll commit the patch and release a new version of the module.
Regards,
Tobias
Comment #2
csc4 commentedThat seems to have got rid of the errors nicely - thanks for doing this so quickly.
Now if I could just figure out what to do with it!
Am I right in thinking I create a bet offer which people then bet on? I'm a bit confused as to how you offer five candidates for a competition?
Comment #3
toddy commentedHi,
thanks for your feedback, I've now committed the fix, so that an updated tarball for 4.7.0 should appear soon.
As to your second question, you're right, you can create a bet offer which can then accept bets from other users. After the bet offer has closed, no more bet are accepted on that offer. After you've entered the outcome of your bet offer, the point calculation happens for each user who has placed a bet on your offer. I'm not sure if this helps you in understanding the module, if not, please contact me again.
Regards,
Tobias
Comment #4
csc4 commentedThanks for the answer - it helps a bit but I'm still confused - if you have five runners in a race how do you do that? Is it one bet option or five and if it is five is it all with the same name? or different names?
HorseA 7/8
HorseB 10/1
HorseC 15/1
etc?
Comment #5
toddy commentedHi,
I think I begin to understand your problem. To be honest, I think that the type of bet you want to offer is not yet implemented in the module. Currently, the module aims at sports which are played with two teams, e.g. soccer or basketball.
It would be great if you could submit another issue against bookmaker (so that this bug report is kept clean), making it a feature request. If you specify your needs in that feature request, I'll try to implement the scoring system for your type of bets. However, I don't know anything about horse racing, so you'll need to provide me with a correct scoring system for the implementation. :-)
Regards,
Tobias