It means that the "supplied argument is not a valid MySQL result
resource" so.. Line 17 of your script mailsender2.php is trying to
manipulate a variable that isn't actually a mysql result. In some
previous line you should have set the result resource variable equal to
something else, on that line
Yup, we're mind readers, I can figure out your entire script and
database structure from the error message.
On Thu, 30 Sep 2004 13:30:25 -0700 (PDT), Yemi Obembe
<[EMAIL PROTECTED]> wrote:
>
>
> Does anyone have an idea what may probably be the cause of this error:
>
> Warning: mysql_fetch_arr
> >
> >
> > Gary Every
> > Sr. UNIX Administrator
> > Ingram Entertainment
> > (615) 287-4876
> > "Pay It Forward"
> > mailto:[EMAIL PROTECTED]
> > http://accessingram.com
> >
> >
> > > -Original Message-
> &
ram Entertainment
> (615) 287-4876
> "Pay It Forward"
> mailto:[EMAIL PROTECTED]
> http://accessingram.com
>
>
> > -Original Message-
> > From: Greg Hetrick [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, July 09, 2003 12:31 PM
> > To: [E
re on the same box.
Gary Every
Sr. UNIX Administrator
Ingram Entertainment
(615) 287-4876
"Pay It Forward"
mailto:[EMAIL PROTECTED]
http://accessingram.com
> -Original Message-
> From: Greg Hetrick [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 09, 2003 1
Query is correct appears to be a problem connecting to the db -- I can
comment out the mysql_select line and I get no change.
"Terry Riley" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> As far as I know, that error means that the query that was supposed to
> produce $result did not
I do not have the die statment -- the DB is the same except the name and I
have double checked that I just did a back up of the previous db and moved
it to the new server. I have done some more digging, my query appears to
work, but I almost appears that I have a problem with selecting the
database
As far as I know, that error means that the query that was supposed to
produce $result did not run because of errors in the SQL (or the
database).
Suggest you check your query in myPHPAdmin or MySQLfront or whatever to be
sure that it has no errors.
Terry
--Original Message-
Do you have an 'or die(mysql_error())' statement following your
mysql_query($result) line. 99% of the time, this error means your query
failed. if it works on another serverare the fields the same, the
dbname, the tablename?
hth
jeff
Try "SELECT id,LEFT(fluff,80) as fluffy FROM sometable"
Then extract() will have a value for fluffy
--- Baumgartner Jeffrey <[EMAIL PROTECTED]> wrote:
> I'm having a problem when I use mysql_fetch_array and extract()
> following a
> left select query. As an example...
>
> $query = "SELECT id,LE
olmes'; 'Graeme McLaren';
[EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql_fetch_array() question
John is right. In fact one routinely calls two different $result(s) when
coding nested loops:
while( $details = mysql_fetch_array( $result ) ) {
while ( $Email = mysql_f
PROTECTED]>; "'Graeme McLaren'"
<[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, November 06, 2002 7:24 PM
Subject: RE: [PHP-DB] mysql_fetch_array() question
> :) see why I love mailing lists! :)
>
> It must have been their logic then, I respect
[mailto:holmes072000@;charter.net]
Sent: Wednesday, November 06, 2002 1:21 PM
To: Josh Johnson; 'Graeme McLaren'; [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql_fetch_array() question
That's not true. You can assign them to different variables and it works
fine.
$r1 = mysql_query("select
etch_array($r2);
print_r($row1);
echo "";
print_r($row2);
---John Holmes...
- Original Message -
From: "Josh Johnson" <[EMAIL PROTECTED]>
To: "'Graeme McLaren'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, November 06, 2
riginal Message-
From: Graeme McLaren [mailto:mickel@;ntlworld.com]
Sent: Wednesday, November 06, 2002 12:17 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql_fetch_array() question
Josh, Thank you for reply. Thank you to everyone else who replied to my
email also. I solved the problem
ent: Wednesday, November 06, 2002 12:29 PM
Subject: RE: [PHP-DB] mysql_fetch_array() question
> I concur with Jason, but if restructuring is out of the question, just
> rearrange your queries like this:
>
> $query = "SELECT Name, Address FROM users";
> $result
itely recommend restructuring your talbes as Jason suggested.
-- Josh
-Original Message-
From: Jason Wong [mailto:phplist@;gremlins.com.hk]
Sent: Wednesday, November 06, 2002 5:24 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] mysql_fetch_array() question
On Tuesday 05 November 2002 05:4
On Tuesday 05 November 2002 05:47, Graeme McLaren wrote:
> Hi, Anyone know how I can use two mysql_fetch_array() functions similar
> to the code below? I've tried a few different ways but I keep getting
> Resource ID #4. I need to do this to retrieve an email address from one
> table and retrieve
Thanks for all your helpful suggestions. It turns out I was limiting the
array myself by setting a temporary table column definition to varchar(255).
I have been overlooking it all this time. I feel so stupid. Thanks again for
trying to help me.
Paul
"Paul Burney" <[EMAIL PROTECTED]> wrote in me
Problem solved. I was stupidly overlooking an incorrect column definition in
a temporary table. Everything's fine now. Thank you so much for trying to
help me, and please excuse my errors.
Paul
"Richard Hutchins" <[EMAIL PROTECTED]> wrote in message
1EA7D3AE70ACD511BE6D006097A78C1E022BF618@USROC
lt;[EMAIL PROTECTED]> wrote in message
> > 01ed01c237ea$0d0fcf10$1601a8c0@nik">news:01ed01c237ea$0d0fcf10$1601a8c0@nik...
> > > Do you have PhpMyAdmin installed? If you have try with it to see the
> > > results. It uses native mysql functions.
> > &
I am a bonehead. In stripping down my code for posting here, the problem
suddenly went away. I was building a temporary table and all this time I've
been overlooking the fact that my txtSWDesc1 field in the tmp table was set
to 255. My apologies to everyone. And thanks for trying to help me.
Paul
on 7/30/02 10:34 AM, Paul Worthington at [EMAIL PROTECTED] appended the
following bits to my mbox:
> I'm using this PHP code, very simple and straightforward, to select two
> columns into an array and then display the results in an HTML table:
> ...
One thing I haven't seen yet is a cut-n-paste of your db tables. Could you
post that to this list? Maybe there's something you're overlooking there?
Maybe seomebody will find something amiss there.
I know it sounds simple and you might think you have it all down right, but
how many times have you
01a8c0@nik...
> > Do you have PhpMyAdmin installed? If you have try with it to see the
> > results. It uses native mysql functions.
> >
> > Andrey
> >
> > - Original Message -
> > From: "Paul Worthington" <[EMAIL PROTECTED]>
> >
> -Original Message-
> From: Paul Worthington [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, July 30, 2002 9:34 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-DB] mysql_fetch_array limit? - more details
>
>
> What happens is I'm only getting the first 256 characters of
> txtSWDesc1 displayed
Yeaah!
I am a fool. My biggest excuses.
Sorry Rasmus and everyone else.
Andrey
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Andrey Hristov" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, July 30, 2002 8:11 PM
S
: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
> To: "Andrey Hristov" <[EMAIL PROTECTED]>
> Cc: "Paul Worthington" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Tuesday, July 30, 2002 7:59 PM
> Subject: Re: [PHP-DB] mysql_fetch_array limit?
onnections parameter from the
default of 100.
[/snip]
Andrey
- Original Message -
From: "Rasmus Lerdorf" <[EMAIL PROTECTED]>
To: "Andrey Hristov" <[EMAIL PROTECTED]>
Cc: "Paul Worthington" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sen
What do you mean it uses 2? It does not.
On Tue, 30 Jul 2002, Andrey Hristov wrote:
> Maybe it will help you but I've read that when using persistent connections
> PHP uses 2 on every request.
> So if in one moment you have 10 scripts,that use persistent connections,
> running you will have 20
Admin installed? If you have try with it to see the
> results. It uses native mysql functions.
>
> Andrey
>
> - Original Message -
> From: "Paul Worthington" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 30, 2002 7:53 PM
>
Do you have PhpMyAdmin installed? If you have try with it to see the
results. It uses native mysql functions.
Andrey
- Original Message -
From: "Paul Worthington" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 30, 2002 7:53 PM
Subject: Re: [PHP
Thank you for that idea. I don't think that's it, though, because this
script is the only one I'm ever running on this site. The problem is
perfectly consistent and repeatable, which leads me to believe it's
something in the way the array is being built.
Paul Worthington
[EMAIL PROTECTED]
"Andre
Maybe it will help you but I've read that when using persistent connections
PHP uses 2 on every request.
So if in one moment you have 10 scripts,that use persistent connections,
running you will have 20 connections used to the mysql.
Regards,
Andrey
- Original Message -
From: "Paul Worthi
change coding to (note, each line is enclosed in quotes and ends withn "."):
$query="select user_id, user_name, time, status, comment from users".
"where sign=1".
"order by user_name".
"limit $offset, $step";
print $query; //sanity check...contents of $query
$res=mysql_query($query) or die(mysql
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:
that's not a mysql_fetch_array() error it's a coding error
-Original Message-
From: Web user [mailto:[EMAIL PROTECTED]]
Sent: 27 September 2001 05:48
To: [EMAIL PROTECTED]
Subject: [PHP-DB] mysql_fetch_array() doesn't work
System: PHP4.06 + Mysql3.23.41 Win32 + Apache 1.3.20 Win32 + Win
This was indeed the problem, I was calling the mysql_fetch_array earlier in
the code.
Once removed it worked fine.
Thanks.
Jamie
"Paul Burney" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> on 8/7/01 1:41 PM, Jamie ([EMAIL PROTECTED]) wrote:
>
> > while ($pr
At 9:41 PM +0100 8/7/01, Jamie wrote:
>Hi,
>
>I have this code to display records from a table by reading them into an
>array:
>
>while ($previews = mysql_fetch_array($result) {
> code to display record here...
>}
>
>For some reason it refuses to display the very first record in the table.
Th
on 8/7/01 1:41 PM, Jamie ([EMAIL PROTECTED]) wrote:
> while ($previews = mysql_fetch_array($result) {
> code to display record here...
> }
>
> For some reason it refuses to display the very first record in the table.
> Why is this and how can I get round it?
Are you calling mysql_fetch_array
I was having the same problem for a while... although, I
was using this:
for($i=0;$i
Good luck,
Ben
Quoting BrianSander <[EMAIL PROTECTED]>:
> Greetings,
>
> I'm experiencing the strangest problem and I was
> wondering if anyone
> else has had the same problem.
>
> I have a fairly simple scr
You must use a loop to show each row of your query.
"mysql_fetch_array($result)" only get the current row.
while($row = mysql_fetch_array($result) ){
// do something
}
The "mysql_fetch_array" function returns an associative array where you can
use the field names to have access to its val
> How can I refer to one specific row in this query..?
> What I mean is, how can i refer to result row number 4...?
>
> If I only selected rows from one table I could do something like this:
>
> $i = mysql_fetch_array($sql) ;
> echo "$i[4]" ;
Actually, no. mysql_fetch_array return the _current r
Trond,
What is your table structure?
I'm guessing you need a different query.
Also, be aware that mysql_fetch_array returns an array with the field name
as value, so:
$sql="select fields from table where id = $id";
$connection_handle=(mysql_connect($user, $pass, $host);
mysql_select_db($databa
44 matches
Mail list logo