eMoneySpace
Welcome, Guest. Please login or register.
Did you miss your activation email?
News: Welcome to eMoneySpace! Jun 26, 2022 11:29 PM




PTP help please
Print
Author Topic: PTP help please  (Read 2010 times)
Shawn
Reputation: (+34)
*

Offline

Gender: Male
Posts: 11846
Referrals: 23

Just a retarded DUCK

View Profile
Jan 16, 2009 05:00 PM

I'm almost done with the PTP part of my script, but I can't figure something out.

How do I make the entrepreneurs only earn money if there is an ad running?  Because I don't want people promoting the PTP with no ads to steal my money Tongue
Logged

Every time you kill a kitten, God looks at child porn.
Delusional

Reputation: (+2)
*

Offline

Gender: Male
Posts: 4713
Referrals: 6


GPSBlack Creator

View Profile WWW
Reply #1: Jan 16, 2009 05:17 PM

I'm almost done with the PTP part of my script, but I can't figure something out.

How do I make the entrepreneurs only earn money if there is an ad running?  Because I don't want people promoting the PTP with no ads to steal my money Tongue
use an if statement

and use mysql_num_rows function.

for example
Code:
$q = mysql_query("SELECT * FROM ads WHERE active='1'");
$num = mysql_num_rows($q);

if($num != 0)
{
while($r=mysql_fetch_array($q))
{
$ptp = "whatever";
}
}
else
{
$ptp = "whatever";
}
Logged

Shawn
Reputation: (+34)
*

Offline

Gender: Male
Posts: 11846
Referrals: 23

Just a retarded DUCK

View Profile
Reply #2: Jan 16, 2009 08:17 PM

Thanks Delusional, I'll try now big grin

I figured it would be an if statement, but I didn't want to try because my comp. kind of sucks.  A bad error could easily break it when I test Tongue
Logged

Every time you kill a kitten, God looks at child porn.
Delusional

Reputation: (+2)
*

Offline

Gender: Male
Posts: 4713
Referrals: 6


GPSBlack Creator

View Profile WWW
Reply #3: Jan 17, 2009 05:14 PM

Thanks Delusional, I'll try now big grin

I figured it would be an if statement, but I didn't want to try because my comp. kind of sucks.  A bad error could easily break it when I test Tongue
test it online, if you need a place to test i can setup a testing area for you.
Logged

Shawn
Reputation: (+34)
*

Offline

Gender: Male
Posts: 11846
Referrals: 23

Just a retarded DUCK

View Profile
Reply #4: Jan 17, 2009 05:17 PM

Nah, I got it, thanks big grin
Logged

Every time you kill a kitten, God looks at child porn.
Print
 
Jump to:  
Copyright © 2008-2022 eMoneySpace. All rights reserved.