Database storage or flat file?
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:

https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Whats the site url?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Ok, please PM me - I'm really curious now. 
btw: you should link from here - won't it 'up' your google rank?

btw: you should link from here - won't it 'up' your google rank?
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system
linklink ! hehehe
On the long run i think you dont get around a profile system where you store related votes inside the profile DB.
Create a Vote Table with all votes by user ID ( index field ) or IP (well IP restrictions apply bad idea).
Then create a link table which links votes against user IDs and then do a left joint query across both tables. This is probably the fastest way and uses a binary indexing and search on the db tables inside mysql.
Or Simpler:
Use a Table for IPs stored as Integers ( Longs ) then use this as (Indexed!) lookup table with a COUNT query on the IP Table and IF the result is greater than 1 the user has voted and then you can do the real query on the Votes table to get the IDs and compare them. That way you just do the hard query on need.
To create a Integer Decimal based IP ID you can use the following:
Cheers,
Thalius
On the long run i think you dont get around a profile system where you store related votes inside the profile DB.
Create a Vote Table with all votes by user ID ( index field ) or IP (well IP restrictions apply bad idea).
Then create a link table which links votes against user IDs and then do a left joint query across both tables. This is probably the fastest way and uses a binary indexing and search on the db tables inside mysql.
Or Simpler:
Use a Table for IPs stored as Integers ( Longs ) then use this as (Indexed!) lookup table with a COUNT query on the IP Table and IF the result is greater than 1 the user has voted and then you can do the real query on the Votes table to get the IDs and compare them. That way you just do the hard query on need.
To create a Integer Decimal based IP ID you can use the following:
Code: Select all
<?php
$a = 192 ;
$b = 168;
$c = 1;
$d = 1;
$ip = $a*pow(256,3) + $b*pow(256,2) + $c*256 +$d ;
echo $ip;
?>
Thalius
"In 3D there is never enough Time to do Things right,
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone!
"
but there's always enough Time to make them *look* right."
"psssst! i steal signatures... don't tell anyone!

links sent, just remember the site makes money
and enjoy


thanks for the tipsThalius wrote:linklink ! hehehe
On the long run i think you dont get around a profile system where you store related votes inside the profile DB.
Create a Vote Table with all votes by user ID ( index field ) or IP (well IP restrictions apply bad idea).
Then create a link table which links votes against user IDs and then do a left joint query across both tables. This is probably the fastest way and uses a binary indexing and search on the db tables inside mysql.
Or Simpler:
Use a Table for IPs stored as Integers ( Longs ) then use this as (Indexed!) lookup table with a COUNT query on the IP Table and IF the result is greater than 1 the user has voted and then you can do the real query on the Votes table to get the IDs and compare them. That way you just do the hard query on need.
To create a Integer Decimal based IP ID you can use the following:
Cheers,Code: Select all
<?php $a = 192 ; $b = 168; $c = 1; $d = 1; $ip = $a*pow(256,3) + $b*pow(256,2) + $c*256 +$d ; echo $ip; ?>
Thalius

- DoubleDutch
- Addict
- Posts: 3220
- Joined: Thu Aug 07, 2003 7:01 pm
- Location: United Kingdom
- Contact:
Just seen the link - not normally something I'd visit, but I can understand how it could make you some $.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
https://reportcomplete.com <- School end of term reports system