RE: [PHP-DB] Resource id #5

2008-03-27 Thread Miguel Guirao
Been a positive integer, it jeans that the SQL query was succesfully executed, read the function description. __ Miguel Guirao Aguilera, Linux+, ITIL Sistemas de Información Informática R8 Ext. 7540 -- -Original Message- -- From: Richard Dunne [mailto:[EMAIL PROTECTED]

Re: [PHP-DB] Resource id #5

2008-03-27 Thread Stut
On 27 Mar 2008, at 17:51, Richard Dunne wrote: Can someone explain how I can translate Resource id #5 which is what I am getting from the code below? $result = mysql_query(Select answer from answers) or die(mysql_error()); $resultArray = explode(',',$result); for

Re: [PHP-DB] Resource id #2

2002-11-27 Thread Adam Voigt
Umm, he is putting them into an array, I quote: while ($row = mysql_fetch_array($result)) { $row['Books.Title']; $row['Books.Author']; $row['Books.ISBN']; $row['BookList.dbase']; $row['BookList.dbase_user']; $row['BoxSet.BoxSet'];

Re: [PHP-DB] Resource id #2

2002-11-27 Thread Mark
But what do all those $row['fieldname'} rows do? Call me ignorant (you wouldn't be the first), but a statement that simply has a variable name doesn't DO anything. Should these have echos in front of them? --- Adam Voigt [EMAIL PROTECTED] wrote: Umm, he is putting them into an array, I quote:

Re: [PHP-DB] Resource id #2

2002-11-27 Thread Adam Voigt
They don't do anything, but my point was, he said that what he pulled from the DB needed to be put into an array, and I was pointing out, it already was. On Wed, 2002-11-27 at 12:23, Mark wrote: But what do all those $row['fieldname'} rows do? Call me ignorant (you wouldn't be the first), but a

Re: [PHP-DB] Resource id #2

2002-11-26 Thread Adam Voigt
Add: print_r($row) In your while loop, that will show you everything that is being returned with both it's numeric and text based position. On Tue, 2002-11-26 at 13:09, The Cossins Fam wrote: Hello. I am using MySQL as a database for a departmental library. I have written a quick search

RE: [PHP-DB] Resource id #2

2002-11-26 Thread Jason Vincent
Try this... either... while ($row = mysql_fetch_array($result)) { $title = $row['Books.Title']; $author = $row['Books.Author']; ... print $title; } or... while ($row = mysql_fetch_array($result)) { print $row['Title']; ... } -Original

Re: [PHP-DB] Resource id #2

2002-11-26 Thread Jason Wong
On Wednesday 27 November 2002 02:09, The Cossins Fam wrote: Hello. I am using MySQL as a database for a departmental library. I have written a quick search script, but keep getting resource id #2 as a result to my search. I have read the online documentation for the mysql_fetch_array()

RE: [PHP-DB] resource ID #3

2002-07-11 Thread Beau Lebens
Jonathan, most (all?) of the database query-related functions in PHP return a Resource ID which contains the data resulting from your query. To access that information, you need to pass the Resource ID thru a function like (assuming u r using MySQL) mysql_fetch_array() or mysql_fetch_row() Have

RE: [PHP-DB] resource id#2 - ????

2002-06-12 Thread Leotta, Natalie (NCI/IMS)
The quick answer is that that is what it's supposed to return... that's all the result is. A nicer, longer answer is to give you some of my code so you can see one way that you actually get the data out (I use sybase_fetch_row, but you can also use db_fetch_array which returns an associated

Re: [PHP-DB] resource id#2 - ????

2002-06-12 Thread Paul DuBois
At 11:42 -0600 6/12/02, Jas wrote: Not sure how to over come this, the result of a database query keeps giving me this: ?php /* Get Ip address, where they came from, and stamp the time */ if (getenv(HTTP_X_FORWARDED_FOR)){ $ipaddy = getenv(HTTP_X_FORWARDED_FOR); } else { $ipaddy =

RE: [PHP-DB] resource id#2 - ????

2002-06-12 Thread Leotta, Natalie (NCI/IMS)
; [EMAIL PROTECTED] Subject: Re: [PHP-DB] resource id#2 - At 11:42 -0600 6/12/02, Jas wrote: Not sure how to over come this, the result of a database query keeps giving me this: ?php /* Get Ip address, where they came from, and stamp the time */ if (getenv(HTTP_X_FORWARDED_FOR)){ $ipaddy

Re: [PHP-DB] resource id#2 - ????

2002-06-12 Thread Jas
Thanks a ton, I was really looking right past that variable. Jas Paul Dubois [EMAIL PROTECTED] wrote in message news:p05111763b92d3addd3b4@[192.168.0.33]... At 11:42 -0600 6/12/02, Jas wrote: Not sure how to over come this, the result of a database query keeps giving me this: ?php /* Get

Re: [PHP-DB] Resource ID#2 ????

2002-05-29 Thread Jason Wong
On Thursday 30 May 2002 00:17, Jas wrote: Ok here is my problem, I set this up so a user selects a name form a select box and that name or $user_id is then passed to this page so the user can edit the contact info etc. However it does not pull the selected $user_id and place each field into

Re: [PHP-DB] Resource ID#2 ????

2002-05-29 Thread Jas
If you look at the previously posted code at the bottom of the form there is a echo for the sql select statement that is echoing Resource id #2 on the page. Now that error is the correct field id number in the database, I am just not sure how to itemize the data from that table, at least I

RE: [PHP-DB] Resource ID#2 ????

2002-05-29 Thread Leotta, Natalie (NCI/IMS)
I could be missing something, but it looks like you are using the result of the mysql_query as the actual result. It actually returns some weird identifier. To access the real info you'd have to use something like mysql_fetch_array to get it. Check out this and see if it helps:

Re: [PHP-DB] Resource ID#2 ????

2002-05-29 Thread Jason Wong
On Thursday 30 May 2002 00:41, Jas wrote: If you look at the previously posted code at the bottom of the form there is a echo for the sql select statement that is echoing Resource id #2 on the page. Now that error is the correct field id number in the database, I am just not sure how to

Re: [PHP-DB] Resource ID#2 ????

2002-05-29 Thread Jas
How can I get the form below to list the single record in a db that matches the request of $user_id? $table = auth_users; $record = @mysql_query(SELECT * FROM $table WHERE user_id = '$user_id',$dbh); while ($row = mysql_fetch_row($record)) { $user_id = $row['user_id']; $f_name =

Re: [PHP-DB] Resource Id #2

2002-01-23 Thread Dan Brunner
: [EMAIL PROTECTED] Sent: Wednesday, January 23, 2002 12:21 PM Subject: Re: [PHP-DB] Resource Id #2 Use something like this... ... ... ... $rows = mysql_num_rows($result); for ($y = 0; $y $rows; $y++){ $data = mysql_fetch_object($result); echo $data-Field_Name

Re: [PHP-DB] Resource Id #2

2002-01-23 Thread Dan Brunner
AHAHAHHAHA AHHAHAHAH Dan On Wednesday, January 23, 2002, at 02:19 PM, [EMAIL PROTECTED] wrote: Dan, Good, I'm glad it worked!!! I see a lot of people using mysql_fetch_array(). Which is fine...But I'm more into Object Oriented programming...and that's why I always use

Re: [PHP-DB] resource id #2, #3, #4......

2001-11-28 Thread Jason Wong
On Thursday 29 November 2001 01:29, Kevin Ruiz wrote: I've come across yet another problem. [snip] $ci = select contactid from users where username='$username' and password='$password'; $cir = mysql_query($ci) or die(Couldn't execute); $query = select

Re: [PHP-DB] Resource id #2

2001-10-28 Thread DL Neil
I am trying to select a message from a table in a database. the message will will be in column 'msg' and will be in same row as id='0'. I need that msg put to the screen. With the code below I get the error: Resource id #2 Can someone please explain how I can fix this.. Thankyou in advance. ?

RE: [PHP-DB] Resource ID

2001-08-28 Thread Walter, Marcel
I don´t know what your class does ... but normally queries work like this: open database $qresult = query(select blah,$link_id); // Now, in $qresult is a number with which you can go through your resultset ... // For Example: while ( $Recordset = ezi_fetch_array($qresult) ) { print

RE: [PHP-DB] Resource ID

2001-08-28 Thread Craig Vincent
Scott, The resource IDs are integer identifiers PHP uses to identify the different queries being done on the system. However if you want to actually extract the information from those queries you need to use either the mysql_fetch_row() or mysql_fetch_array queries. Oh and on another