[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 paul.halli...@gmail.com 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

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 paul.halli...@gmail.com wrote: Whats the difference between fetch_assoc and fetch_row? I use: while ($row = mysql_fetch_row($theQuery)) { ? ?doCartwheel; } on just under

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 p...@umpquanet.com 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 -- /Daniel P. Brown

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]); // This is to set

Re: [PHP] mysql_fetch_array

2007-11-04 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

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-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

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

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

[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

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

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_mostrar

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 dimention

[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

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') Array ( [2]

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 Like:

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 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, I use

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 creates

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: Hi Rob, Thanks

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 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()

2004-08-18 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:

Re: [PHP] mysql_fetch_array()

2004-08-18 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

Re: [PHP] mysql_fetch_array()

2004-08-18 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 that I see that

[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

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,

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

[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).

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: ? echo phpinfo(); ? (view it in a browser) JO like the newest version of MySQL insatlled, and PHP and MySQL work fine JO together, excpet

[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

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 table

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 be position 0 in

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_formatted

[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() 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

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

2003-10-07 Thread Chris W. Parker
Marek Kilimajer mailto:[EMAIL PROTECTED] 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 unsubscribe,

[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:

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-generalm=105517588819420 Also, this faq explains it:

[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

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: ?php error_reporting(E_ALL); $conn = mysql_connect('host','user','pass'); if (!$conn) { print Could not connect to mysql : .

[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

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 the

[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

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 have a

RE: [PHP] mysql_fetch_array()

2002-04-05 Thread Phil Ewington
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... $events = mysql_fetch_array($recordset); this drags in 3 columns from my table... event_id

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 through all

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 through

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: [PHP] mysql_fetch_array From: Greg Sidelinger

[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

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. -- PHP

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

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

2001-09-27 Thread Jason G.
echo a href='$PHP_SELF?offset=$i*$step' target='_top' 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

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

2001-09-27 Thread Naintara Jain
- 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 + Mysql3.23.41 Win32 + Apache 1.3.20 Win32 + Win98 When PHP is running at the line: $arr=mysql_fetch_array

[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

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 :

[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 ? .. .. $res=mysql_query($query); $num=mysql_num_rows($res); for($i=0; $i$num; $i++){ $arr=mysql_fetch_array($res); ... } ... When PHP is running at the line: $arr=mysql_fetch_array($res); The IE always show info as

[PHP] mysql_fetch_array

2001-09-06 Thread nate
Can someone tell me what i'm doing wrong here? ?php //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 = '$REMOTE_ADDR',$db); while($myrowmysql_fetch_array($result2)) { echo Print

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? ?php //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 sagar
PROTECTED] Sent: Thursday, September 06, 2001 2:09 PM Subject: [PHP] mysql_fetch_array Can someone tell me what i'm doing wrong here? ?php file://Connect to db $db = mysql_pconnect(localhost,login,pass); mysql_select_db(database,$db); file://Check for the IP $result2 = mysql_query(SELECT ip FROM ip

[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

[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: ?php $connection=mysql_connection(...); $db=mysql_select_db(.);

RE: [PHP] mysql_fetch_array()

2001-03-07 Thread Tyler Longren
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: [PHP] mysql_fetch_array() Greetings! I am using P

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: ?php

[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

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.2

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 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: Forgot to

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 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 is it's

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

[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);

Re: [PHP] mysql_fetch_array strangeness

2001-01-21 Thread Kristi Russell
. -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 used as key values in a mysql_f