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 ($i=0;$i
For the love of
TECTED]
--> Sent: Thursday, March 27, 2008 11:51 AM
--> To: php-db@lists.php.net
--> Subject: [PHP-DB] Resource id #5
-->
--> Can someone explain how I can translate Resource id #5 which is what I
--> am getting from the code below?
-->
--> $result = mysql_query("Sele
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 ($i=0;$ihttp://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
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
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:
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.BoxSe
You need to put your $result into an array. you can use:
$result_array = mysql_fetch_array($result);
then, if you know the field names in the array, print them like so:
echo $result_array["field1"];
echo $result_array["field2"];
or if you dont know their names you can refer to their position nu
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_arra
...
}
-Original Message-
From: The Cossins Fam [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 26, 2002 1:10 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Resource id #2
Hello.
I am using MySQL as a database for a departmental library. I have written a
quick search script, but keep
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
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() function and must say, I don't see that I'm missing
anything. Howe
_fetch_row()
Have a look at those 2 (or their equivalents for different DBs) in the
manual and go from there :)
HTH
Beau
// -Original Message-
// From: Jonathan [mailto:[EMAIL PROTECTED]]
// Sent: Friday, 12 July 2002 9:18 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] "resource ID #3&q
I am a newbie to php (as i have announced several times on this bulletin
board =) so I thank you all for your help.
Mi problemo:
I have a database of events going on at local colleges. The names of the
tables are the abbreviated names of the colleges. I grab those with a 'SHOW
TABLES' command
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:
> > >/*
: Jas; [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: /* Get Ip address, where they came from, and stamp the time */
>if (getenv(HTTP_X_FORWARDED_FOR)){
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:
>/* 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 = get
(so my sql started with select sex...)
-Natalie
-Original Message-
From: Jas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 12, 2002 1:42 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] resource id#2 -
Not sure how to over come this, the result of a database query keeps giving
me this: $id
Not sure how to over come this, the result of a database query keeps giving
me this:
$id$file_name$file_size$file_properties<
/td>$file_codec$file_author"; }
} else {
/* Start a new session and register variables */
session_start();
session_register('ipaddy');
session_register('referrer
lt. 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:
>
> http://www.php.net/manual/en/function.mysql-query.php
>
> -Natalie
>
>
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
http://www.php.net/manual/en/function.mysql-query.php
-Natalie
-Original Message-
From: Jas [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 29, 2002 12:18 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Resource ID#2
Ok here is my problem, I set this up so a user selects a name form a select
bo
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 thin
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 i
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 my form boxes, all I get is a Resource ID #2.
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
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 mysql_fetch_object()
hey this is a family show - but I guess 'what you do in the privacy of' ...
gt;
> J. Wharton
> [EMAIL PROTECTED]
>
> - Original Message -
> From: "Dan Brunner" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Wednesday, January 23, 2002 12:21 PM
> Subject: Re: [PHP-DB] Resource Id #2
&g
eq will be
set to false, so checking that before using it as an array is a good idea)
- Patrick
- Original Message -
From: "James Kupernik" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, January 18, 2002 12:05 PM
Subject: [PHP-DB] Resource id #2
I run this query $countreq = mysql_query("SELECT COUNT(*) FROM catalogs
WHERE PROCESSED IS NULL"); then try to echo $countreq but end up getting
Resource id #2 instead of the count total. What would cause this?
Thanks for any advise!
James
--
PHP Database Mailing List (http://www.php.net/)
T
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
I've come across yet another problem.
I have a table set up that houses four things, a person's real name,
username, pass, and id. The id is used to join another table which houses
that persons contacts. I've been validating the user and pass by comparing
the number of rows that the sql stateme
Change code as follows:
".$row['msg']."";
?>
-Original Message-
From: Andrew Duck [mailto:[EMAIL PROTECTED]]
Sent: Sunday, October 28, 2001 7:00 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Resource id #2
I am trying to select a message from a table in a dat
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.
$m
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.
$m
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 no
print $Recordset["ColumnName"];
}
close database
...
Hope I am right (because I donĀ“t know your class ...)
> -Original Message-
> From: Scott Mebberson [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, August 28, 2001 07:06
> To: [EMAIL PROTECTED]
> Subject:
Hi Guys,
I am querying my MySQL database with this sql:
$q->ezi_query($db, "SELECT id FROM words WHERE word='$word'");
ezi_query() is just a class - an database layer so the databases can be
swapped.
Then I check the result to see if it worked. But all I get in the result is
Resource id #5 - t
37 matches
Mail list logo