vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vBookie - vBulletin Betting Hack (https://vborg.vbsupport.ru/showthread.php?t=65844)

Battle_Ring 06-08-2004 03:01 PM

that edit didnt change anythign and my

uttpoints_pointsfield ----uttpoints
and
uttpoints_pointtable ----user

tjdrico 06-08-2004 03:10 PM

Quote:

Originally Posted by Battle_Ring
that edit didnt change anythign and my

uttpoints_pointsfield ----uttpoints
and
uttpoints_pointtable ----user

Well, I'm a bit puzzled then. Unless I'm just missing something blatently obvious. I don't have a well-used forum handy that uses uCash that I can try an duplicate this problem on. I tried to view your forum but it required registration for viewing.

Do you know how to run SQL commands using the console or mySQL? You could try running the select and what it looks like.

It should be:

[sql]SELECT u.username, p.uttpoints AS cash FROM user AS p LEFT JOIN user AS u ON u.userid=p.userid ORDER BY cash DESC LIMIT 5;[/sql]

Battle_Ring 06-08-2004 03:20 PM

i ran the quey and this si what it says

Creeper 990
Platinum~Pimp 98
|†|KryptoniK|†| 9485
shinoda 93
ºDissØrderlyº 9152
yo-yo's-r-us 91
madhatter 9
~*Ladie Berretta*~ 88
nimbus 87
STYLES 8679469
Blak Siinz 855
K-jun 85
Katana no Mune 83
Exact SkillZ 82
PURE*EVIL 80
ThOr-O 8
Denze 8
.:.¼¦¶Lü§.:. 8
Q_skinnypimp 8
Eye Solation 8

tjdrico 06-08-2004 03:33 PM

Oh, wait... it's using a character field, not an integer. So it uses "dictionary" ordering. Two ticks while I look up the mySQL syntax to cast a VARCHAR to an INT. =)

tjdrico 06-08-2004 03:39 PM

OK, if you do the following, it should fix that little problem:

Open includes/functions_vbookie.php

Find:
PHP Code:

$q "SELECT u.username, p.".$vboptions['uttpoints_pointsfield']." AS cash FROM " TABLE_PREFIX $vboptions['uttpoints_pointtable']." AS p LEFT JOIN " TABLE_PREFIX "user AS u ON u.userid=p.userid ORDER BY cash DESC LIMIT 5"

Replace with:

PHP Code:

$q "SELECT u.username, (p.".$vboptions['uttpoints_pointsfield']."+0) AS cash FROM " TABLE_PREFIX $vboptions['uttpoints_pointtable']." AS p LEFT JOIN " TABLE_PREFIX "user AS u ON u.userid=p.userid ORDER BY p.".$vboptions['uttpoints_pointsfield']." DESC LIMIT 5"


Battle_Ring 06-08-2004 03:41 PM

nope

tjdrico 06-08-2004 03:44 PM

Did for me. Are you sure you saved it? Uploaded it? What version of mySQL are you using? Did you try it at the console too?

Battle_Ring 06-08-2004 03:46 PM

i only use the one in the console

Battle_Ring 06-08-2004 03:47 PM

i can give you ful ladmin access to my site and ftp info and stuff and you can see if you can do it

tjdrico 06-08-2004 03:47 PM

What about:

PHP Code:

$q "SELECT u.username, CONVERT(p.".$vboptions['uttpoints_pointsfield'].", SIGNED) AS cash FROM " TABLE_PREFIX $vboptions['uttpoints_pointtable']." AS p LEFT JOIN " TABLE_PREFIX "user AS u ON u.userid=p.userid ORDER BY p.".$vboptions['uttpoints_pointsfield']." DESC LIMIT 5"

Maybe your version of mySQL handles the +0 differently. The CONVERT() function should be the same though I think. I'm not sure about older versions of mySQL - this manual is for 4.0.9

Oh, I just read that "The CAST() and CONVERT() functions were added in MySQL 4.0.2. " so if you're on mySQL 3 then it'll still be unhappy. =) I'll look some more.


All times are GMT. The time now is 01:51 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01686 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete