Database Forum
Web Database Register Members List Calendar FAQ

 
Go Back   Database Forum > PHPMagic Discussions > Customization
User Name
Password

Reply
 
Thread Tools Search this Thread Display Modes
Default Is this possible
02-10-2011, 12:05 PM #1  

oklaslim
Junior Member

 
Status: Offline
Posts: 7
Join Date: Feb 2011

I have created my database with PHP Magic Plus.

Here is what I want to do is it possible and if so which files would I need to modify.

On each row of my table I have 2 players
Player 1 and Player 2 also a score for each player.

There will be several rows in the table view with different players for each game, each row is the players that are competing against each other.

My question is:

Is it possible to Bold the name of the player with the higher score?

Thanks
Reply With Quote

Default
02-10-2011, 05:03 PM #2  

clifford
Senior Member

 
Status: Offline
Posts: 266
Join Date: Mar 2005
Location: San Fran, CA

Hi,

It’s not that hard but instead of messing with the code that works as it should you should consider a simple query script for this.

I am not sure of all the field names in this table but hopefully you have at a date field or timestamp field in each record. This would be necessary for any query. Whether you modify the generated file(s) or write another query script.

What is the table name and field names? Also when displaying these records how to want to display them. (eg)
Date Range –(next seven, ten, thirty days? Specific date?

mysql> SELECT NOW(), DATE_ADD(NOW(), INTERVAL 1 MONTH)
Reply With Quote

Default Is this possible
02-10-2011, 07:21 PM #3  

oklaslim
Junior Member

 
Status: Offline
Posts: 7
Join Date: Feb 2011

Well I need this to be available at the time of entry as we are running tournaments live on the internet and need to know the results at the end of each game. Yes I have a timestamp, but for this purpose it would not have a bearing.
Reply With Quote

Default Is this possible
02-11-2011, 04:42 PM #4  

oklaslim
Junior Member

 
Status: Offline
Posts: 7
Join Date: Feb 2011

Here is the query generated by PHP Magic Plus with some modification (calculations that are working properly). What I would like to do is either Bold or change the background color of Player1_ID or Player2_ID for the player with the higher Total (Player1_Total or Player2_Total)


$x->Query = "select Player_Master4.NickName as 'Player1_ID', Round1.Player1_Raw as 'Player1_Raw', Round(250-(Player_Master4.Total_Raw/Player_Master4.Games)) as 'Player1_Hand', Round(Round1.Player1_Raw + Round(250-(Player_Master4.Total_Raw/Player_Master4.Games))) as 'Player1_Total', Player_Master8.NickName as 'Player2_ID', Round1.Player2_Raw as 'Player2_Raw', Round(250-(Player_Master8.Total_Raw/Player_Master8.Games)) as 'Player2_Hand', Round(Round1.Player2_Raw + Round(250-(Player_Master8.Total_Raw/Player_Master8.Games))) as 'Player2_Total' from Round1, Player_Master as Player_Master4, Player_Master as Player_Master8 where Round1.Player1_ID=Player_Master4.Player_ID and Round1.Player2_ID=Player_Master8.Player_ID";
Reply With Quote

Default
02-11-2011, 05:48 PM #5  

Lana
Senior Member

 
Status: Offline
Posts: 110
Join Date: Oct 2007

Maybe you can do it in the generated tablename_templateTV.html file.
Reply With Quote

Default Is this possible
02-13-2011, 06:21 AM #6  

oklaslim
Junior Member

 
Status: Offline
Posts: 7
Join Date: Feb 2011

What would you suggest using for the conditions, javascript, php, or something I am not aware of?
Reply With Quote

Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 -5. The time now is 12:56 AM.

Powered by: vBulletin Version 3.7.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Database Forums

Help support our forum assistants and product development ->

go to top go to top