Two Plus Two Newer Archives  

Go Back   Two Plus Two Newer Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 06-19-2006, 10:55 PM
hyped1 hyped1 is offline
Junior Member
 
Join Date: Nov 2005
Posts: 22
Default Querying a MYSQL database?

I use pokeroffice and recently downloaded mysql and converted poker office to use mysql database instead. I want to be able to query the database myself. I backup my database through poker office and it creates a backup of my database as a myz file. Now, how do I query the database within this file? I want to be able to conduct such queries as SELECT playername WHERE vpip > 40 or something like that. Do I need to create a php script to connect to the database in the local myz file and then upload to a webserver and query the database that way? Thanks for any help.
Reply With Quote
  #2  
Old 06-20-2006, 03:26 AM
tomtemor tomtemor is offline
Senior Member
 
Join Date: May 2005
Posts: 628
Default Re: Querying a MYSQL database?

I'm not capable of helping you out but I suggest you to ask the same thing in Poker Office's forums as well.

Good luck
Reply With Quote
  #3  
Old 06-21-2006, 03:31 PM
luckydonut luckydonut is offline
Member
 
Join Date: Apr 2005
Location: Stoke-on-Trent
Posts: 41
Default Re: Querying a MYSQL database?

Tweak this to get the desired result. This query finds players with 40% or higher flops seen (just because it's easier to find than VPIP) at 2/4 full ring. They must have played at least 100 hands also. You could also add in a condition for game.site_id to restrict it to a particular site.

Give it a while to run if you've got a big database...

<font class="small">Code:</font><hr /><pre>
select p.nickname,
count(distinct g.gameid) as hands,
sum(a.sawflop)/count(distinct g.gameid) * 100 as sawflop,
sum(a.raisedpreflop)/count(distinct g.gameid) * 100 as pfr
from player p, action a, game g
where p.playerid = a.playerid
and a.gameid = g.gameid
and g.nrofplayers between 7 and 10
and g.level = '2/4'
group by p.playerid
having sawflop &gt;= 40 and hands &gt;= 100
order by sawflop desc, pfr;
</pre><hr />

I did attempt to add post-flop aggression into the query, but it gets messy as you have to look at various combinations of fields and I'm still not sure that it works correctly...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:18 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.