spewn
Programmer
- May 7, 2001
- 1,034
i have a database with 4 entries, and i would like to display only 2 of them, randomly.
here's my code:
i'm looking online and trying to figure this out.
any ideas?
- g
here's my code:
Code:
$dbh = DBI->connect("dbi:mysql:mydata","myuser","mypass");
$sth = $dbh->prepare("select oID from mytable");
$sth->execute;
$cnt = $sth->rows;
$dbh->disconnect();
use constant XOID => 0;
$y=0;
while (@row = $sth8->fetchrow_array()) {
$xid=$row[XOID];
print << "EOF";
here's where is show the results
EOF
$y++;
}
i'm looking online and trying to figure this out.
any ideas?
- g