[PHP] Re: mysql_fetch_array() vs mysql_fetch_assoc() WAS: Re: [PHP] Why does this script run out of memory?

2011-10-28 Thread Paul Halliday
On Fri, Oct 28, 2011 at 7:19 PM, Daniel Brown wrote: > On Fri, Oct 28, 2011 at 18:13, Paul Halliday wrote: >> >> Whats the difference between fetch_assoc and fetch_row? >> >> I use: >> while ($row = mysql_fetch_row($theQuery)) { >>    doCartwheel; >> } >> >> on just under 300 million rows and not

[PHP] Re: mysql_fetch_array

2007-11-03 Thread M. Sokolewicz
Eduardo Vizcarra wrote: I have a WHILE sentence to retrieve all records from a SELECT query in a database and am using mysql_fetch_array to store them in a matrix, the sentence is like this: while($row=mysql_fetch_array($fotos)) { $fotos_mostrar[] = $row; } $fotos contains all records

Re: [PHP] Re: mysql_fetch_array()

2004-08-17 Thread Matthew Sims
> On Tue, 17 Aug 2004 18:18:24 -0400 > [EMAIL PROTECTED] (Anthony Ritter) wrote: > >> When using mysql_fetch_array() is it necsessary to specify the second >> argument - meaning the constant of MYSQL_NUM or MYSQL_ASSOC? > php.net/mysql_fetch_array > array mysql_fetch_array ( resource result [, int

[PHP] Re: mysql_fetch_array()

2004-08-17 Thread Hannes Magnusson
On Tue, 17 Aug 2004 18:18:24 -0400 [EMAIL PROTECTED] (Anthony Ritter) wrote: > When using mysql_fetch_array() is it necsessary to specify the second > argument - meaning the constant of MYSQL_NUM or MYSQL_ASSOC? php.net/mysql_fetch_array array mysql_fetch_array ( resource result [, int result_type

[PHP] Re: mysql_fetch_array problem

2002-08-11 Thread Bogdan Stancescu
Hi Jonni! You should consider wrapping mysql_fetch_*() functions into a personalized function which also takes care of errors - at least for debugging. Your problem is typical - your query has some problems and mysql_run_query() returns a null result, which is indeed not a valid MySQL result

[PHP] Re: mysql_fetch_array()

2002-04-09 Thread David Anton
while( $row = mysql_fetch_array( $recordset ) ) { $var1 = $row["event_id"] ; $var2 = $row["event_title"] ; $var3 = $row["event_date"] ; } Don't forget that what you get with mysql_fetch_array() is just a array where the indexes are just the name of the columns. Un saludo "Phi

[PHP] Re: mysql_fetch_array() doesn't work

2001-09-30 Thread Web user
Hello, First, Thank you all for your help! I finally found the reason for why does the IE always show info as below: "Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in c:\program files\apache group\apache\htdocs\web\site1\list.php on line --[the number of line]"

[PHP] Re: mysql_fetch_array() doesn't work

2001-09-30 Thread Web user
Hello, First, Thank you all for your help! I finally found the reason for why does the IE always show info as below: "Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in c:\program files\apache group\apache\htdocs\web\site1\list.php on line --[the number of line]"

[PHP] Re: mysql_fetch_array() doesn't work

2001-09-25 Thread Pedja
array mysql_fetch_row (resource result) MySql_fetch_array returns an array that corresponds to the fetched row, or FALSE if there are no more rows. So put MySql_fetch_array in FOR loop. Look like this: for ($count = 1; $row = mysql_fetch_row ($query_result_handle); ++$count) { ... } ...the

[PHP] Re: mysql_fetch_array

2001-09-07 Thread Doug Granzow
<[EMAIL PROTECTED]> wrote in message 001001c136af$7c649db0$[EMAIL PROTECTED]">news:001001c136af$7c649db0$[EMAIL PROTECTED]... >Can someone tell me what i'm doing wrong here? > >while($myrow<>mysql_fetch_array($result2)) > I would guess that you actually want that line to read: while($myrow=mysq

[PHP] Re: mysql_fetch_array

2001-09-06 Thread James Holloway
Hey Nate, _ <[EMAIL PROTECTED]> wrote in message 001001c136af$7c649db0$[EMAIL PROTECTED]">news:001001c136af$7c649db0$[EMAIL PROTECTED]... Can someone tell me what i'm doing wrong here? mysql_fetch_array($result2)) { echo "Print some text here!"; } ?>

[PHP] Re: mySql_fetch_array($result) question.

2001-08-21 Thread CC Zona
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Mehmet Kamil Erisen) wrote: > I have a form that has more than one drop down lists. I > like to use the mysql_fetch_array($result) to populate the > select options. > The problem is that after the first use, the > mysql_fetch_array($result) doe