How many replies can we get??

Status
Not open for further replies.
Originally posted by gt2_gs


..well im not..

eheh, just kidding. you have some good music on there :D
Ya i know i have good music.
im hackin GT3 right now :D
 
Originally posted by gt2_gs
by the way, thanks for the help Giles! It works great! :D
You're welcome. Glad to be of service. I'm suffering data overload at the moment, and can't work out how to organise it in my database. :eek: :confused: :mad:
 
<----Done adding Porsche 966 GT3, Lancia Stratos, and Lanica Stratos WRC to GT3 garage :D
 
Originally posted by gt2_gs
hey Giles, can a while loop be set to a variable?

If you mean "Can a while loop be set to be dependent upon a variable" then yes.

while(condition) can have almost anything in it, so you can have

$var = 0;
while($var <10)
{
echo $var."<br>\n";
$var++;
}

Which will list you the numbers 0 to 9.
 
Originally posted by GilesGuthrie


Pedant's corner:
996

Mah bad, im not a huge Porsche fan.....but i still shouldnt have made such an error, i feel disgraced :(
 
Originally posted by MistaX
<----Done adding Porsche 966 GT3, Lancia Stratos, and Lanica Stratos WRC to GT3 garage :D

i badly need a sharkport... how much do these things sell for, approx?
 
Originally posted by PunkRock


i badly need a sharkport... how much do these things sell for, approx?
I dunno yet, lemme get to see the cars first :)
 
no i mean like, say i want to call a variable, then have it execute a while loop, like this:

$var = (while stuff here)

echo "yarbles $var";

because i cannot have it just print out, i need it to replace a {string} in a db on print out..
 
Originally posted by gt2_gs
no i mean like, say i want to call a variable, then have it execute a while loop, like this:

$var = (while stuff here)

echo "yarbles $var";

because i cannot have it just print out, i need it to replace a {string} in a db on print out..
Oh, OK.

Then No. You need to use a function. I assume that you're fetching multiple records from the database and setting $var to be equal to all of them? Like:
$record[1] = "Hello"
$record[2] = "gt2"
therefore
$var = "Hello gt2"

Is that right?

Might need to go back to PM on this one!
 
Originally posted by MistaX
boooooo
Max HP in the street Stratos is 244HP

What do you expect from a 1970s 2.5L NA V6?

Sheesh. Some folk are never satisfied!
 
ok, well here is an example of what my while loop is gonna be:

while ($myrow = mysql_fetch_row($result)) {
printf("<tr><td>%s %s</td><td>%s</td></tr>\n", $myrow[1], $myrow[2], $myrow[3]);
}

... and ofcourse my db searc and stuff is already there..
 
Originally posted by GilesGuthrie


What do you expect from a 1970s 2.5L NA V6?

Sheesh. Some folk are never satisfied!
Ahem that was a FERRARI V6
 
Originally posted by PunkRock
how do they fare? are they fun to drive?

All i did was the 0-400 in the street Lanica, did it in 12sec. notin special
 
Originally posted by MistaX
Wow the mudflaps on the WRC Stratos move like real ones

they do on the Delta and the Escort Cosworth too...
 
Originally posted by MistaX

Ahem that was a FERRARI V6

It's still 97.6bhp/l, from a 1970s engine! (and I knew it was a Ferrari engine - the one from the 246 Dino, to be precise)
 
Originally posted by GilesGuthrie


It's still 97.6bhp/l, from a 1970s engine! (and I knew it was a Ferrari engine - the one from the 246 Dino, to be precise)
But the car won Monte Carlo 4 times or somthing!
 
Originally posted by gt2_gs
ok, well here is an example of what my while loop is gonna be:

while ($myrow = mysql_fetch_row($result)) {
printf("<tr><td>%s %s</td><td>%s</td></tr>\n", $myrow[1], $myrow[2], $myrow[3]);
}

... and ofcourse my db searc and stuff is already there..
I think you want to do this after the mysql_query statement:

$noofrows = mysql_numrows($result)
for($i = 0; $i<$noofrows; $i++)
{
$myrow = mysql_fetch_row($result);
printf("<tr><td>%s %s</td><td>%s</td></tr>\n", $myrow[1], $myrow[2], $myrow[3]);
}


Make sense? Or does that send you off in a different direction?
 
Status
Not open for further replies.
Back