Dec. 24th, 2008

I'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...

Profile

pyxaron

July 2011

S M T W T F S
     12
3456789
101112131415 16
17181920212223
24252627282930
31      

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 4th, 2025 01:56 am
Powered by Dreamwidth Studios