Re: 2 dimension array have a max lenght ?
Marie-Eve wrote:
I have 6688 lines in my table.
But when I try to display them with a 2 dimension array, it stop at
line 5804.
Here is the code example:
WORK (simple array):
$i = 0;
while ($row = pg_fetch_row($result)) {
echo $i . "----";
echo "id: $row[0]";
echo "<br />\n";
$i++;
}
DON'T WORK (same code but with a 2 dimension array):
$i = 0;
while ($results[$i] = pg_fetch_row($result)) {
echo $i;
echo ";";
echo $results[$i][0];
echo ";";
echo $results[$i][4];
echo "<br />\n";
$i++;
}
Someone can explain that to me ?
Thanks !
The second example is /not/ the same code as the first. Do you get the
same result when your second piece of code is:
$i = 0;
while ($results[$i] = pg_fetch_row($result)) {
echo $i . "----";
echo "id: $results[$i][0]";
echo "<br />\n";
$i++;
}
.
Relevant Pages
- Re: newbie: array passing problem
... Perhaps I didn't make myself very clear in my previous post, but you actually *can* do that in VB (pass a reference to a specific "column" of a 2D array to a subroutine in such a way that the subroutine only needs to use a single index). ... The structure itself of course only takes up about twenty or so bytes of memory. ... You can then point that SAFEARRAY structure at an uninitialised VB array of Singles as Single) and as far as VB is concerned the myColumn array will be a one dimension array of 500 variables of the type Single. ... (microsoft.public.vb.general.discussion) - Re: Non repeating list of names
... I probably do not need a 4 dimension array as my discriminant is the part of line from the left to the first comma. ... So I guess the program you suggested could do that if I use some function that reads the line, returns the Name portion of the line as the discriminant for repeated value and then writes the whole line to the correct sublist? ... (microsoft.public.scripting.vbscript) - Re: Array in javascript
... This is exactly the case with JavaScript array wich is a single ... dimension array when looking at it "from the top". ... the worst option available means that your endorsement may ... (comp.lang.javascript) - Re: how to pass a 1 dimension array pointer to a function taking a 2 dimensinoal array pointer?
... Instead of using an array of pointers to a vector, use a pointer to an array ... Sylvain Lafontaine, ing. ... want to copy my 1 dimension array to a 2 dimension array before calling F. ... (microsoft.public.vc.mfc) - Re: Q on the Array function...
... Private Sub Command0_Click ... Dim i As Integer, j As Integer, PString As String ... Is WeekDays not a 7x2 array? ... dimension array, using the Array function, to get the result you want. ... (comp.databases.ms-access) |
|