Search found 8 matches

by chson
Mon Nov 18, 2002 9:53 am
Forum: PHP coding => General
Topic: Basic Question
Replies: 4
Views: 1671

BUMP
by chson
Sat Nov 16, 2002 9:05 pm
Forum: PHP coding => General
Topic: Basic Question
Replies: 4
Views: 1671

What if there's also an array involved in the variable? This currently doesn't work:

if (($test.$i.[$i]) == $test2)

Neither does this:

if (($test.$i[$i]) == $test2)
by chson
Fri Nov 15, 2002 9:13 pm
Forum: PHP coding => General
Topic: Basic Question
Replies: 4
Views: 1671

Thanks Dmitrit. I will give it a shot tommorrow.
by chson
Thu Nov 14, 2002 5:06 pm
Forum: PHP coding => General
Topic: Basic Question
Replies: 4
Views: 1671

Basic Question

Does anybody know how I'd make the: $test.$i loop so it's read by the program as $test1 and then $test2? The result of the program should be: FAIL PASS <? $test1 = 1; $test2 = 2; for ($i=1; $i<3; $i++) { if ($test.$i == $test2) echo "PASS<p>"; else echo "FAIL<P>&q...
by chson
Fri Nov 01, 2002 3:11 pm
Forum: PHP coding => General
Topic: Can't find the error..
Replies: 2
Views: 1262

Thanks DoppyNL. Removed the 1st "rank" in the query and it worked fine.
by chson
Thu Oct 31, 2002 9:05 pm
Forum: PHP coding => General
Topic: Can't find the error..
Replies: 2
Views: 1262

Can't find the error..

Can anyone see the error on line 3 of this piece of code? $rankquery = "select rank, max(rank) from info"; $rankresult = mysql_query($rankquery); $rank = mysql_fetch_row($rankresult); Here's the error message: Warning: Supplied argument is not a valid MySQL result resource in /home/www/et/register.p...
by chson
Fri Oct 18, 2002 10:16 pm
Forum: mySQL & php coding
Topic: Web database design question
Replies: 2
Views: 1610

Thanks DoppyNL.

After I posted this question I figured out a solution that was somewhat similar to yours.

create table history
( Date date,
Winner char(25),
Loser char(25)
);
by chson
Thu Oct 17, 2002 6:40 pm
Forum: mySQL & php coding
Topic: Web database design question
Replies: 2
Views: 1610

Web database design question

Hi. I'm creating a text based fighting game simulator that'll have people saving their characters on mySQL. How should I design my table(s) to store each characters fighting history? For example: John has wins against Eric, Joe, Peter, Kenny, and Chuck. Joe has wins against Eric and Peter. Losses ag...