while working on a psql table I have found, that for some reason when my script causes the following warnings:
Warning: Unable to jump to row 17 on PostgresSQL result index 2 in /usr/local/apache/htdocs/webroot/scripts/banner4.php on line 38
Warning: Unable to jump to row 17 on PostgresSQL result index 2 in /usr/local/apache/htdocs/webroot/scripts/banner4.php on line 39
Warning: Unable to jump to row 17 on PostgresSQL result index 2 in /usr/local/apache/htdocs/webroot/scripts/banner4.php on line 40
Warning: Unable to jump to row 17 on PostgresSQL result index 2 in /usr/local/apache/htdocs/webroot/scripts/banner4.php on line 41
this confuses me simply becuase it only happens on the last row of my table.
require("dbconect.inc.php");
$result = pg_exec($db, "SELECT * FROM comm ORDER BY id DESC;");
$numrows = pg_numrows($result);
srand((double)microtime()*100000);
$ran1 = rand(1,$numrows);
$ran2 = rand(1,$numrows);
while($ran2 == $ran1){
$ran2 = rand(1,$numrows);
}
$ran3 = rand(1,$numrows);
while($ran3 == $ran1 || $ran3 == $ran2){
$ran3 = rand(1,$numrows);
}
$ran4 = rand(1,$numrows);
while($ran4 == $ran1 || $ran4 == $ran2 || $ran4 == $ran3){
$ran4 = rand(1,$numrows);
}