(no subject)
Dec. 24th, 2008 11:58 amI'm sure you're not supposed to search a DB like that...
... $code is the var sent to the script, it's supposed to return all the rows matching that code.
-------
while ( in1_code != $code )
(
$try = random(0, 65535)
select in1_code, in1_seq from inv1 where in1_seq = $try;
)
select * from inv1 where in1_seq = $try into temp invres;
------
... so basically, it picks a row at random, checks to see if it's the one it wants, and repeats 'till it finds it.
Gah...
... $code is the var sent to the script, it's supposed to return all the rows matching that code.
-------
while ( in1_code != $code )
(
$try = random(0, 65535)
select in1_code, in1_seq from inv1 where in1_seq = $try;
)
select * from inv1 where in1_seq = $try into temp invres;
------
... so basically, it picks a row at random, checks to see if it's the one it wants, and repeats 'till it finds it.
Gah...