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

2011-10-28 Thread Daniel Brown
On Fri, Oct 28, 2011 at 18:48, Jim Long wrote: > > I'm not seeing any numeric keys in my mysql_fetch_assoc() arrays. You're absolutely correct, that's my mistake: substitute mysql_fetch_row() for mysql_fetch_assoc(). Duh. Time to call it a week -- Network Infrastructure Manager h

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

2011-10-28 Thread Jim Long
On Fri, Oct 28, 2011 at 06:19:56PM -0400, 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 mil

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

2011-10-28 Thread Daniel Brown
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 nothing craps out. I have > memory_limit set to 4GB though. Although

Re: [PHP] mysql_fetch_array

2007-11-05 Thread Philip Thompson
On 11/3/07, Eduardo Vizcarra <[EMAIL PROTECTED]> wrote: > > Hi guys > > After doing some changes, I believe it is partially working, what I did is > the following: > while($row=mysql_fetch_array($fotos)) > { >$fotos_mostrar[] = $row; > } > $primer_foto = reset($fotos_mostrar[0]); // Thi

Re: [PHP] mysql_fetch_array

2007-11-04 Thread Jim Lucas
[EMAIL PROTECTED] wrote: Do you even need reset()? I've never used it. Personally, I do not see the need. The op is building the array then wanting to work with it. At this point, the internal pointer should still be at the beginning. AFAIK Jim -- PHP General Mailing List (http://www.php.ne

Re: [PHP] mysql_fetch_array

2007-11-04 Thread heavyccasey
Do you even need reset()? I've never used it. On Nov 3, 2007 11:08 PM, Jim Lucas <[EMAIL PROTECTED]> wrote: > Eduardo Vizcarra wrote: > > Hi guys > > > > After doing some changes, I believe it is partially working, what I did is > > the following: > > while($row=mysql_fetch_array($fotos)) > >

Re: [PHP] mysql_fetch_array

2007-11-03 Thread Jim Lucas
Eduardo Vizcarra wrote: Hi guys After doing some changes, I believe it is partially working, what I did is the following: while($row=mysql_fetch_array($fotos)) { $fotos_mostrar[] = $row; } $primer_foto = reset($fotos_mostrar[0]); // This is to set the pointer to the first record e

Re: [PHP] mysql_fetch_array

2007-11-03 Thread Eduardo Vizcarra
Hi guys After doing some changes, I believe it is partially working, what I did is the following: while($row=mysql_fetch_array($fotos)) { $fotos_mostrar[] = $row; } $primer_foto = reset($fotos_mostrar[0]); // This is to set the pointer to the first record echo $primer_foto; // This di

Re: [PHP] mysql_fetch_array

2007-11-03 Thread Jim Lucas
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] mysql_fetch_array

2007-11-02 Thread Richard S. Crawford
On Friday 02 November 2007 18:23:03 Eduardo Vizcarra wrote: >   while($row=mysql_fetch_array($fotos)) >   { >    $fotos_mostrar[] = $row; >   } > > $fotos contains all records found in a db table, the SELECT statement is > retrieving 2 columns from a table, how do I store all records in a 2 > dimen

Re: [PHP] mysql_fetch_array

2007-11-02 Thread Eduardo Vizcarra
Yes, matrix has been defined just before this WHILE sentence "Cristian Vrabie" <[EMAIL PROTECTED]> escribió en el mensaje news:[EMAIL PROTECTED] > this is most peculiar. your code should do exactly what you expect. have > you initialized the $fotos_mostrar array before the while loop? > $fotos_mo

Re: [PHP] mysql_fetch_array

2007-11-02 Thread Cristian Vrabie
this is most peculiar. your code should do exactly what you expect. have you initialized the $fotos_mostrar array before the while loop? $fotos_mostrar = array(); Eduardo Vizcarra wrote: I have a WHILE sentence to retrieve all records from a SELECT query in a database and am using mysql_fetch_

[PHP] mysql_fetch_array

2007-11-02 Thread Eduardo Vizcarra
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 found in a db table, the

RE: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Andras Kende
-Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 6:12 PM To: Andras Kende Cc: php-general@lists.php.net Subject: RE: [PHP] mysql_fetch_array to associative array On Mon, 2007-07-16 at 13:37 -0700, Andras Kende wrote

RE: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Robert Cummings
On Mon, 2007-07-16 at 13:37 -0700, Andras Kende wrote: > > > function GetAssoc($query) { > > $get = $this->Execute ( $query ); > > > $result = array(); > > while ( $row = mysql_fetch_array($get) ) {

RE: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Andras Kende
-Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 1:46 PM To: Andras Kende Cc: php-general@lists.php.net Subject: RE: [PHP] mysql_fetch_array to associative array On Mon, 2007-07-16 at 13:37 -0700, Andras Kende wrote: > >

RE: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Robert Cummings
On Mon, 2007-07-16 at 13:37 -0700, Andras Kende wrote: > > Hi Rob, > > Thanks for your help, its associative but I forget to mention its needs > To be a single dimensional associative array. > > > $result = array(); > while ( $row = mysql_fetch_assoc($get) ) { > $result[] = $row; > } > > This

RE: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Andras Kende
-Original Message- From: Robert Cummings [mailto:[EMAIL PROTECTED] Sent: Monday, July 16, 2007 7:52 AM To: Andras Kende Cc: php-general@lists.php.net Subject: Re: [PHP] mysql_fetch_array to associative array On Mon, 2007-07-16 at 07:41 -0700, Andras Kende wrote: > Hello, > >

Re: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Jim Lucas
Andras Kende wrote: Hello, I use the following GetArray for returning an array from mysql results. But having a hard time modifying it for returning a simple associative array Like: $conn->GetAssoc('SELECT id, name from manufacturers') Array ( [2] => BMW [1] => MAZDA [9] => FORD )

Re: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Robert Cummings
On Mon, 2007-07-16 at 10:52 -0400, Robert Cummings wrote: > On Mon, 2007-07-16 at 07:41 -0700, Andras Kende wrote: > > Hello, > > > > I use the following GetArray for returning an array from mysql results. > > > > But having a hard time modifying it for returning a simple associative array > > >

Re: [PHP] mysql_fetch_array to associative array

2007-07-16 Thread Robert Cummings
On Mon, 2007-07-16 at 07:41 -0700, Andras Kende wrote: > Hello, > > I use the following GetArray for returning an array from mysql results. > > But having a hard time modifying it for returning a simple associative array > > Like: > > $conn->GetAssoc('SELECT id, name from manufacturers') > > A

[PHP] mysql_fetch_array to associative array

2007-07-16 Thread Andras Kende
Hello, I use the following GetArray for returning an array from mysql results. But having a hard time modifying it for returning a simple associative array Like: $conn->GetAssoc('SELECT id, name from manufacturers') Array ( [2] => BMW [1] => MAZDA [9] => FORD ) function GetAr

Re: [PHP] mysql_fetch_array()

2004-08-17 Thread Chris Shiflett
--- Anthony Ritter <[EMAIL PROTECTED]> wrote: > My question was the call to > > mysql_fetch_array() > > will also return a result set without the additional argument > constant as in: > > while ($row = mysql_fetch_array($sql)) > {... > // no constant is being used > > There are many times tha

Re: [PHP] mysql_fetch_array()

2004-08-17 Thread Anthony Ritter
Thank you Chris. My question was the call to mysql_fetch_array() will also return a result set without the additional argument constant as in: while ($row = mysql_fetch_array($sql)) {... // no constant is being used There are many times that I see that used in textbooks - without the constan

Re: [PHP] mysql_fetch_array()

2004-08-17 Thread Chris Shiflett
--- Anthony Ritter <[EMAIL PROTECTED]> wrote: > When using mysql_fetch_array() is it necsessary to specify the > second argument - meaning the constant of MYSQL_NUM or > MYSQL_ASSOC? Whenever you have a question about a function, you can look it up using a URL formatted as follows: http://www.php

Re: [PHP] mysql_fetch_array()

2004-08-17 Thread John Holmes
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? I have seen many examples where it is left out and it is coded: $row = mysql_fetch_array($sql); as opposed to $row = mysql_fetch_array($sql, MYSQL

[PHP] mysql_fetch_array()

2004-08-17 Thread Anthony Ritter
When using mysql_fetch_array() is it necsessary to specify the second argument - meaning the constant of MYSQL_NUM or MYSQL_ASSOC? I have seen many examples where it is left out and it is coded: $row = mysql_fetch_array($sql); as opposed to $row = mysql_fetch_array($sql, MYSQL_BOTH); Thank you

Re: [PHP] mysql_fetch_array problem? O.o

2004-04-15 Thread Burhan Khalid
Jeff Ostapchuk wrote: Ok, I have no clue what version of PHP I have installed, 4.??.??, and I have like the newest version of MySQL insatlled, and PHP and MySQL work fine together, excpet when I use mysql_fetch_row($query) then I have problems, mysql_fetch_array($query) works fine, but not mysql

Re: [PHP] mysql_fetch_array problem? O.o

2004-04-14 Thread Richard Davey
Hello Jeff, Thursday, April 15, 2004, 3:18:53 AM, you wrote: JO> Ok, I have no clue what version of PHP I have installed, 4.??.??, and I have Find out: (view it in a browser) JO> like the newest version of MySQL insatlled, and PHP and MySQL work fine JO> together, excpet when I use mysql_fet

[PHP] mysql_fetch_array problem? O.o

2004-04-14 Thread Jeff Ostapchuk
Ok, I have no clue what version of PHP I have installed, 4.??.??, and I have like the newest version of MySQL insatlled, and PHP and MySQL work fine together, excpet when I use mysql_fetch_row($query) then I have problems, mysql_fetch_array($query) works fine, but not mysql_fetch_row($query). Why

Re: [PHP] mysql_fetch_array

2004-03-26 Thread Tom Rogers
Hi, Saturday, March 27, 2004, 4:50:27 AM, you wrote: CM> I have this query to select the date from my table... CM> SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table CM> How do I know what name mysql_fetch_array assigned to the date_format ? SELECT DATE_FORMAT(date1, '%W %M %Y') AS date_formatte

Re: [PHP] mysql_fetch_array

2004-03-26 Thread John W. Holmes
From: "Adam Voigt" <[EMAIL PROTECTED]> > On Fri, 2004-03-26 at 13:50, Chris Mach wrote: > > > > I have this query to select the date from my table... > > > > SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table > > > > How do I know what name mysql_fetch_array assigned to the date_format ? > > It would

Re: [PHP] mysql_fetch_array

2004-03-26 Thread Adam Voigt
It would be position 0 in the array, or in your query after the date format function you could put "AS blah" and then it would come out as blah. On Fri, 2004-03-26 at 13:50, Chris Mach wrote: > I have this query to select the date from my table... > > SELECT DATE_FORMAT(date1, '%W %M %Y') FROM t

[PHP] mysql_fetch_array

2004-03-26 Thread Chris Mach
I have this query to select the date from my table... SELECT DATE_FORMAT(date1, '%W %M %Y') FROM table How do I know what name mysql_fetch_array assigned to the date_format ?

RE: [PHP] mysql_fetch_array() not working as expected

2003-10-07 Thread Chris W. Parker
Marek Kilimajer on Tuesday, October 07, 2003 12:26 PM said: > (c.id) You can make the query: > SELECT c.id > , cc.id AS ccid > , cc.prod_id > , p.name doh! how obvious! thanks. c. -- PHP General Mailing List (http://www.php.net/) To unsubscrib

Re: [PHP] mysql_fetch_array() not working as expected

2003-10-07 Thread Marek Kilimajer
Chris W. Parker wrote: Hey peeps. Let me make this simple. I've got the following sql query in a function: SELECT c.id , cc.id , cc.prod_id , p.name , cc.price , cc.qty FROM cart AS c INNER JOIN cart_contents AS cc ON cc.cart_id = c.id INNER

[PHP] mysql_fetch_array() not working as expected

2003-10-07 Thread Chris W. Parker
Hey peeps. Let me make this simple. I've got the following sql query in a function: SELECT c.id , cc.id , cc.prod_id , p.name , cc.price , cc.qty FROM cart AS c INNER JOIN cart_contents AS cc ON cc.cart_id = c.id INNER JOIN products AS p

Re: [PHP] mysql_fetch_array(): supplied argument is not a validMySQL result resource

2003-06-12 Thread Philip Olson
It has to do with you assuming everything will work 100% of the time. It won't. mysql_query() returns false on failure, check for that. Read this recent thread: http://marc.theaimsgroup.com/?l=php-general&m=105517588819420 Also, this faq explains it: http://www.php.net/manual/en/faq.data

[PHP] mysql_fetch_array(): supplied argument is not a valid MySQL result resource

2003-06-12 Thread Ben Houlton
I'm trying to make a PHP script that automaticly makes a link on the side menu to the id page that was just made, under certain catagories. But I edited my code to cleen up soem errors and all of a sudden 3 errors came up, and I haven't been able to fix them! They are: Warning: mysql_fetch_array():

[PHP] mysql_fetch_array problem

2002-08-11 Thread Jonni
hi everyone! i'm new here (and new to php) and have a question. i'm trying to run a simple blogger type script but am running into a problem i can't seem to troubleshoot. first, the three items i put into the database aren't showing up on my page and then when i try to go to the archive for the

Re: [PHP] mysql_fetch_array errors

2002-05-20 Thread Philip Olson
A key to understanding your mysql errors is by using the mysql_error() function. It's wonderful! Here's a simple example with a little error checking: Regards, Philip Olson On Sun, 19 May 2002, Justin Latham wrote: > I am trying to clone my webserver because I am switching ISPs. So I

Re: [PHP] mysql_fetch_array errors

2002-05-19 Thread Richard Archer
At 9:38 PM -0400 19/5/02, Justin Latham wrote: >insists that any query I do is not a valid result resource when I try to use >it in a mysql_fetch_array command. I know that both php and the database So what errors are being returned by all the mysql_* calls? Error messages are their to help th

[PHP] mysql_fetch_array errors

2002-05-19 Thread Justin Latham
I am trying to clone my webserver because I am switching ISPs. So I copied the MySQL database, and then I copied the php pages. But my new server insists that any query I do is not a valid result resource when I try to use it in a mysql_fetch_array command. I know that both php and the database

RE: [PHP] mysql_fetch_array()

2002-04-05 Thread Miguel Cruz
On Fri, 5 Apr 2002, Phil Ewington wrote: > This is for an events calendar, I want all the dates form the db but when I > am generating the individual days for the calendar I need to know whether > there is an event for that day, hence pulling out all the dates from the db. > As I am looping throug

RE: [PHP] mysql_fetch_array()

2002-04-05 Thread heinisch
At 05.04.2002 12:31, you wrote: > >Jason, > >This is for an events calendar, I want all the dates form the db but when I >am generating the individual days for the calendar I need to know whether >there is an event for that day, hence pulling out all the dates from the db. >As I am looping throug

RE: [PHP] mysql_fetch_array()

2002-04-05 Thread Phil Ewington
to:[EMAIL PROTECTED]] > Sent: 05 April 2002 11:31 > To: [EMAIL PROTECTED] > Subject: Re: [PHP] mysql_fetch_array() > > > On Friday 05 April 2002 18:21, you wrote: > > Hi All, > > > > I am new to PHP and am having a bit of trouble. I have a > recordset using...

Re: [PHP] mysql_fetch_array()

2002-04-05 Thread Ben Edwards
$db = mysql_open(); $results = mysql_query( "select * from something", $db ); while( $row = mysql_fetch_array( $results ) ) { processing using $row["column"] as reference } Ben At 11:21 05/04/2002, Phil Ewington wrote: >Hi All, > >I am new to PHP and am having a bit of trouble. I h

[PHP] mysql_fetch_array()

2002-04-05 Thread Phil Ewington
Hi All, I am new to PHP and am having a bit of trouble. I have a recordset using... $events = mysql_fetch_array($recordset); this drags in 3 columns from my table... event_id, event_title, event_date I want to search the recordset for a given date, if found I want to be able to reference even

Re: [PHP] mysql_fetch_array

2001-12-31 Thread Vincent Stoessel
you can also do $queryString = "select table1.uid as 'my_uid' , table2.uid as 'their_uid' from table1, table2 where ... "; Greg Sidelinger wrote: > > -------- > > Subject: >

Re: [PHP] mysql_fetch_array

2001-12-30 Thread Mehmet Kamil ERISEN
Hi, In your SQL, you can say select t1.col colt1, t2.col colt2 from table1 t1, table2 t2 where t1.something = t2.samething In other words, you can name your columns differently in your select clause. I Bogdan Stancescu <[EMAIL PROTECTED]> wrote: If everything else fails, you should consider u

Re: [PHP] mysql_fetch_array

2001-12-30 Thread Bogdan Stancescu
If everything else fails, you should consider using mysql_fetch_row() instead. Bogdan Greg Sidelinger wrote: > Ok I have use mysql_fetch_array to dump the results of a select query with a > join in it. > if my tables contain a column with the same name how can I distinguish from > them. -- P

[PHP] mysql_fetch_array

2001-12-30 Thread Greg Sidelinger
Ok I have use mysql_fetch_array to dump the results of a select query with a join in it. if my tables contain a column with the same name how can I distinguish from them. I'm used to table_name.value method in other languages but when I tried $row['table_name.value'] I don't get any values. can a

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

2001-09-26 Thread Naintara Jain
d query"); and let me know if you still have a problem. -Naintara - Original Message - From: "Web user" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, September 27, 2001 10:18 AM Subject: [PHP] mysql_fetch_array() doesn't work System: PHP4.06 +

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

2001-09-26 Thread Jason G.
echo " Missing end quote and semicolon on this line may be the reason... Try properly indenting and formatting your code. Also take advantage of going in and out of php mode to seperate your code from your display of content... Ex: instead of this: $sContent"); ?> Try this: Or even this:

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

2001-09-26 Thread Philip Olson
hi. this doesn't have to do with mysql_fetch_array. the following will create that error : echo "a $b['c'] d e f"; the following will not : echo "a $b[c] d e {$f['g']} h i $j[$k] l 'm' n o p"; adjust accordingly. just posted a few words on this topic recently, can view them here : ht

[PHP] mysql_fetch_array() doesn't work

2001-09-26 Thread Web user
System: PHP4.06 + Mysql3.23.41 Win32 + Apache 1.3.20 Win32 + Win98 When PHP is running at the line: $arr=mysql_fetch_array($res); 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\

[PHP] mysql_fetch_array() doesn't work

2001-09-25 Thread Web user
System: PHP4.06 + Mysql3.23.41 Win32 + Apache 1.3.20 Win32 + Win98 http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] mysql_fetch_array

2001-09-06 Thread sagar
Thursday, September 06, 2001 2:09 PM Subject: [PHP] mysql_fetch_array Can someone tell me what i'm doing wrong here? mysql_fetch_array($result2)) { echo "Print some text here!"; } ?> Basically I just want to print text if the IP address was not found in the database, and if

Re: [PHP] mysql_fetch_array

2001-09-06 Thread David Robley
On Thu, 6 Sep 2001 18:09, [EMAIL PROTECTED] wrote: > Can someone tell me what i'm doing wrong here? > > //Connect to db > $db = mysql_pconnect("localhost","login","pass"); > mysql_select_db("database",$db); > > //Check for the IP > $result2 = mysql_query("SELECT ip FROM ip where ip = > '$RE

[PHP] mysql_fetch_array

2001-09-06 Thread nate
Can someone tell me what i'm doing wrong here? mysql_fetch_array($result2)) { echo "Print some text here!"; } ?> Basically I just want to print text if the IP address was not found in the database, and if it was found then I want to print "Print some text here!" Please help! Thanks, Nate

[PHP] mySql_fetch_array($result) question.

2001-08-21 Thread ERISEN, Mehmet Kamil
Hello All, Another question. Here is the problem: - One SQL query - 1 result. 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) does not retu

Re: [PHP] mysql_fetch_array()

2001-03-07 Thread David Robley
On Thu, 8 Mar 2001 14:03, Deependra B. Tandukar wrote: > Greetings! > > I am using PHP and MySQL in RedHat 6.0. > I have used mysql_fetch_array() to display the datas in web page but > all the columns are printed twice. What can be the wrong with my code: > $connection=mysql_connection(.

RE: [PHP] mysql_fetch_array()

2001-03-07 Thread Tyler Longren
tried to call $mysql_query, when you needed to call mysql_query. In your code, $mysql_query isn't a variable, it's a function in PHP. -Original Message- From: Deependra B. Tandukar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 9:34 PM To: [EMAIL PROTECTED] Subject: [PH

[PHP] mysql_fetch_array()

2001-03-07 Thread Deependra B. Tandukar
Greetings! I am using PHP and MySQL in RedHat 6.0. I have used mysql_fetch_array() to display the datas in web page but all the columns are printed twice. What can be the wrong with my code: "; while ($row=mysql_fetch_array($sql_result)) { print ""; foreach ($row as $field) pr

RE: [PHP] mysql_fetch_array and row referencing under 4.0.4pl1

2001-02-13 Thread Scott Brown
crawl back under my rock now. > -Original Message- > From: Steve Werby [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, February 13, 2001 12:26 AM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP] mysql_fetch_array and row referencing > under 4.0.4pl1 > >

Re: [PHP] mysql_fetch_array and row referencing under 4.0.4pl1

2001-02-12 Thread Steve Werby
"Scott Brown" <[EMAIL PROTECTED]> wrote: > I grabbed an example of of php.net dealing with just arrays and it works ... > > Here's what I'm seeing - THIS WORKS: > while ( $row = mysql_fetch_array($rslt) ) > { > echo "\n"; > echo "$row[ID]"; > But

RE: [PHP] mysql_fetch_array and row referencing under 4.0.4pl1

2001-02-12 Thread Scott Brown
> > I'd be curious to see others' answers on this because I > upgraded everything > the other day (been at php4 for a while though) and I don't > have a problem > with the quotes. > I've probably just putzed something somewhere during the build it's been one of those days. But the thing i

RE: [PHP] mysql_fetch_array and row referencing under 4.0.4pl1

2001-02-12 Thread Scott Brown
> Forgot to ask - does referencing an array with double quotes > around the key work for arrays not associated with a MySQL > result? I doubt it's specific to MySQL result arrays, but > it doesn't hurt to check. Make a small array and test. I grabbed an example of of php.net dealing with just

Re: [PHP] mysql_fetch_array and row referencing under 4.0.4pl1

2001-02-12 Thread Steve Werby
"Scott Brown" <[EMAIL PROTECTED]> wrote: > $row["this_is_a_field_name"] > > Seems simple, right? > > Well - I compiled a new copy of Apache 1.3.17, pushed PHP up to 4.0.4pl1, > and upgraded mysql to the new stable version at the same time... > > Now the above code doesnt work. But if I do a: For

Re: [PHP] mysql_fetch_array and row referencing under 4.0.4pl1

2001-02-12 Thread Steve Werby
"Scott Brown" <[EMAIL PROTECTED]> wrote: > I have code which runs under PHP3.0.15, and PHP4.0.2 which references the > result of a > $row["this_is_a_field_name"] > > Well - I compiled a new copy of Apache 1.3.17, pushed PHP up to 4.0.4pl1, > and upgraded mysql to the new stable version at the same

Re: [PHP] mysql_fetch_array and row referencing under 4.0.4pl1

2001-02-12 Thread Thomas Deliduka
I'd be curious to see others' answers on this because I upgraded everything the other day (been at php4 for a while though) and I don't have a problem with the quotes. On 2/12/01 11:11 PM this was written: > Have I lost something somewhere? > > I have code which runs under PHP3.0.15, and PHP4.0

[PHP] mysql_fetch_array and row referencing under 4.0.4pl1

2001-02-12 Thread Scott Brown
Have I lost something somewhere? I have code which runs under PHP3.0.15, and PHP4.0.2 which references the result of a $row = mysql_fetch_array($result_of_query); by doing things like: $row["this_is_a_field_name"] Seems simple, right? Well - I compiled a new copy of Apache 1.

Re: [PHP] mysql_fetch_array strangeness

2001-01-24 Thread Markus Fischer
Because, basically, in php an array is a hash with just numbers as keys. m. -- Markus Fischer, http://josefine.ben.tuwien.ac.at/~mfischer/ EMail: [EMAIL PROTECTED] PGP Public Key: http://josefine.ben.tuwien.ac.at/~mfischer/C2272BD0.asc PGP Fingerprint: D3B0 DD4F E12B F911 3CE1 C2B5

Re: [PHP] mysql_fetch_array strangeness

2001-01-21 Thread Kristi Russell
ality. -Anonymous - Original Message - From: "Jaxon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 21, 2001 8:07 PM Subject: [PHP] mysql_fetch_array strangeness > Hi, > > I'm trying to echo out the field names us

Re: [PHP] mysql_fetch_array strangeness

2001-01-21 Thread Kristi Russell
ality. -Anonymous - Original Message - From: "Jaxon" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, January 21, 2001 8:07 PM Subject: [PHP] mysql_fetch_array strangeness > Hi, > > I'm trying to echo out the field names us

Re: [PHP] mysql_fetch_array strangeness

2001-01-21 Thread Richard Lynch
> $rowData = mysql_fetch_array($result); mysql_fetch_array can return an array with only numeric indices, only text (fieldname) indices, *OR* *BOTH*, the default. You need to use the "optional" argument: $rowData = mysql_fetch_array($result, MYSQL_ASSOC); By Day:

[PHP] mysql_fetch_array strangeness

2001-01-21 Thread Jaxon
Hi, I'm trying to echo out the field names used as key values in a mysql_fetch_array: $link_id = mysql_connect("localhost", "root", $pass); mysql_select_db("database", $link_id); $result = mysql_query("select * from lists where id = 1", $link_id); $rowData = mysql_fetch_array($result); while