At 12:40 AM -0500 2/22/11, Gary wrote:
Can someone tell me why this is not working? I do not get an error message,
the results are called and echo'd to screen, the count does not work, I get
a 0 for a result...
$result = mysql_query(SELECT * FROM `counties` WHERE name = 'checked') or
On Tuesday 22 February 2011,
Gary gp...@paulgdesigns.com wrote:
Can someone tell me why this is not working? I do not get an error
message, the results are called and echo'd to screen, the count does not
work, I get a 0 for a result...
Are you sure that the table is called `counties` and
/m_elensule
Facebook: http://facebook.com/menelion
Original message
From: Gary gp...@paulgdesigns.com
To: php-general@lists.php.net
Date created: , 7:40:48 AM
Subject: [PHP] mysql_num_rows()
Can someone tell me why this is not working? I do not get an error
message
Thanks for your reply
Deva devendra...@gmail.com wrote in message
news:aanlktimvycqsi5nejd1lxxaqbqsb+q_onhoc7omgj...@mail.gmail.com...
I tried your script locally. Its working for me.
On Tue, Feb 22, 2011 at 11:10 AM, Gary gp...@paulgdesigns.com wrote:
Can someone tell me why this is not
Daniel Molina Wegener d...@coder.cl wrote in message
news:201102220747.11...@coder.cl...
On Tuesday 22 February 2011,
Gary gp...@paulgdesigns.com wrote:
Can someone tell me why this is not working? I do not get an error
message, the results are called and echo'd to screen, the count does
Can someone tell me why this is not working? I do not get an error message,
the results are called and echo'd to screen, the count does not work, I get
a 0 for a result...
$result = mysql_query(SELECT * FROM `counties` WHERE name = 'checked') or
die(mysql_error());
if (
I tried your script locally. Its working for me.
On Tue, Feb 22, 2011 at 11:10 AM, Gary gp...@paulgdesigns.com wrote:
Can someone tell me why this is not working? I do not get an error
message,
the results are called and echo'd to screen, the count does not work, I get
a 0 for a result...
How can I get an integer value for mysql_affected_rows()? I get text:
n Database Transfer(s).
I would like to create my own error flag and exit; if the number of
affected rows is = 0.
The example for mysql-num-rows in the manual does not work. I have MySQL
- 4.1.12.
$num_rows =
INSERT queries and num_rows just don't go together.
And whatever you've done with mysql_affected_rows() is just some kind
of silly mistake on your part, almost for sure...
On Tue, May 30, 2006 11:28 pm, John Taylor-Johnston wrote:
How can I get an integer value for mysql_affected_rows()? I
Ave,
In one of my scripts, I'm getting the error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /Library/WebServer/Documents/limiteduse.net/dumptoday.php on
line 56
I¹m not clearly sure why. I¹m running PHP5 with mySQL 4 ... Is there a
compatibility issues
Generally you've got an error in your SQL at such points. If you do,
mysql_query return false, and false is nor a valid MySQL result, so
mysql_num_rows errors out.
Check using mysql_error() to see what you're doing wrong
Php Junkie wrote:
Ave,
In one of my scripts, I'm getting the error:
[snip]
In one of my scripts, I'm getting the error:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /Library/WebServer/Documents/limiteduse.net/dumptoday.php on
line 56
I¹m not clearly sure why. I¹m running PHP5 with mySQL 4 ... Is there a
compatibility
On Tuesday 28 September 2004 03:15, PHP Junkie wrote:
In one of my scripts, I'm getting the error:
Use mysql_error() after every call to the mysql_*() functions.
--
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design Hosting * Internet
My question got buried on the bottom of the thread. Sorry for the repeat. I'm getting
this message:
Warning: Supplied argument is not a valid MySQL result resource in /.../testals.php on
line 189
189 if (mysql_num_rows($news) == 1)
Ideas?
$server = localhost;
$user = ;
$pass = ;
$db
John Taylor-Johnston wrote:
My question got buried on the bottom of the thread. Sorry for the repeat. I'm getting this message:
Warning: Supplied argument is not a valid MySQL result resource in /.../testals.php on line 189
Read with me. Supplied argument ($news) is not a valid MySQL result
I can't get mysql_num_rows to work for some reason. Here is a snippet
of what I have
$department_name = $_POST['department_name'];
$select_query = SELECT * WHERE department_name = '$department_name';
$select_result = mysql_query($select_query, $db_connect);
$select_total_rows =
Try:
($select_total_rows == 0)
instead.
That and maybe echo $select_total_rows; to see what
it's returning.
--- Mike Tuller [EMAIL PROTECTED] wrote:
I can't get mysql_num_rows to work for some reason.
Here is a snippet
of what I have
$department_name =
oh and your SQL statement is wrong:
SELECT * FROM table WHERE you are missing the
FROM...
--- Mike Tuller [EMAIL PROTECTED] wrote:
I can't get mysql_num_rows to work for some reason.
Here is a snippet
of what I have
$department_name = $_POST['department_name'];
$select_query =
$department_name = $_POST['department_name'];
$select_query = SELECT * WHERE department_name = '$department_name';
$select_result = mysql_query($select_query, $db_connect);
$select_total_rows = mysql_num_rows($select_result);
if ($select_total_rows1)
{
$insert_query = insert into
I can't believe I forgot that. time to go home for the week.
thanks.
On Friday, April 4, 2003, at 04:28 PM, J J wrote:
oh and your SQL statement is wrong:
SELECT * FROM table WHERE you are missing the
FROM...
--- Mike Tuller [EMAIL PROTECTED] wrote:
I can't get mysql_num_rows to work
Someone helped me out with this to see exactly what the query is
returning...
echo pre the Query: ; print_r ($select_result); echo /pre;
This should show you exactly what the result is getting...
/T
on 4/4/03 4:49 PM, Mike Tuller at [EMAIL PROTECTED] wrote:
I can't believe I forgot that.
PROTECTED]
To: Mike Tuller [EMAIL PROTECTED]; J J [EMAIL PROTECTED]
Cc: php mailing list list [EMAIL PROTECTED]
Sent: Friday, April 04, 2003 4:18 PM
Subject: Re: [PHP] mysql_num_rows
Someone helped me out with this to see exactly what the query is
returning...
echo pre the Query: ; print_r
Anyone know why this is happening? I have mySQL on Win2000 Server with IIS
and PHP:
mysql_num_rows(): supplied argument is not a valid MySQL result resource
Here is my code:
?
$conn = mysql_connect('localhost', xxx, yyy) or die('Could not
connect
to db');
$result = mysql_query
You query is incorrect. Try doing the same query from the MySQL clent.
|- -Original Message-
|- From: Phil Powell [mailto:[EMAIL PROTECTED]]
|- Sent: Thursday, January 09, 2003 7:46 PM
|- To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
|- Subject: [PHP] mysql_num_rows() error
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] mysql_num_rows() error
Anyone know why this is happening? I have mySQL on Win2000 Server with IIS
and PHP:
mysql_num_rows(): supplied argument is not a valid MySQL result resource
Here is my code:
?
$conn = mysql_connect('localhost
And which database are you using?? (hint - mysql_select_db() might be a good
idea ...)
-Original Message-
From: Phil Powell [mailto:[EMAIL PROTECTED]]
Anyone know why this is happening? I have mySQL on Win2000
Server with IIS
and PHP:
--
PHP General Mailing List
Would someone be kind enough to explain why I'm not getting the correct
result from the following query. If I select a valid member no. and name,
the following query should return 1 row. This is not the case, however. It
returns zero rows.
$sql = SELECT * FROM users WHERE member_no =
Would someone be kind enough to explain why I'm not getting the correct
result from the following query. If I select a valid member no. and name,
the following query should return 1 row. This is not the case, however. It
returns zero rows.
$sql = SELECT * FROM users WHERE member_no =
Hi guys;
I have a problem (or mistake(s));
for this code
39| $result=mysql_query(slecet * from site_members where User_Name='$username');
40| $num_row=mysql_num_rows($result);
41| if($num_row0) echo(error 46);
as a reult I have unsolved error in my hands :(
Warning:
Your query on the previous line is failing for one reason or another.
You can use mysql_error() to get the error message from MySQL, or you
can place an echo statement in your code to make sure the SQL
statement is what you think it is.
You can also try the SQL statement yourself interactively
I suppose it's nothing to do with the spelling mistake in the sql statement
(slecet should be select)
Mark
-Original Message-
From: empty [mailto:[EMAIL PROTECTED]]
Sent: 21 November 2002 15:57
To: [EMAIL PROTECTED]
Subject: [PHP] mysql_num_rows
Hi guys;
I have a problem
Hi,
39| $result=mysql_query(slecet * from site_members where
User_Name='$username'); 40| $num_row=mysql_num_rows($result);
41| if($num_row0) echo(error 46);
There is an typo-error in the word slecet which shoud look like select :-)
-Sascha
--
PHP General Mailing List
add
echo mysql_error();
after line 39, it should tell you why the query failed in the future.
Now I can tell you you have a typo:
slecet = select
empty wrote:
Hi guys;
I have a problem (or mistake(s));
for this code
39| $result=mysql_query(slecet * from site_members where
I have a file. I'll paste from line 32 to 34
?
.
$sql = select USUARIO from docente where USUARIO = '$usuario';
$result = mysql_query($sql, $link);
if (mysql_num_rows($result) == 1) { // line 34
?
I get the next warning:
Warning: mysql_num_rows(): supplied argument is
Omar Campos wrote:
I get the next warning:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result
resource in /home/olimpiad/public_html/base/alta1.php on line 34
This usually means that the SQL query failed. You can check the value
returned by mysql_query to see if this is
Well, those error normaly appear when you've got something wrong in your sql
statement. Make sure there is some information stored in your database,
empty tables are sometimes troublesome.
What do you use $link for?
$sql = select USUARIO from docente where USUARIO = '$usuario';
$result =
I am new to php and that the folowing error: Warning:
mysql_num_rows():
supplied argument is not a valid MySQL result resource in
/home/tbonestu/public_html/smallimages.php
i dont know what i am doing wrong here is the code:
$db = mysql_pconnect(connect info);
I am new to php and that the folowing error: Warning:
mysql_num_rows():
supplied argument is not a valid MySQL result resource in
/home/tbonestu/public_html/smallimages.php
i dont know what i am doing wrong here is the code:
$db = mysql_pconnect(connect info);
Hi Nick,
I am new to php and that the folowing error:
Warning: mysql_num_rows(): supplied argument
is not a valid MySQL result resource in
/home/tbonestu/public_html/smallimages.php
i dont know what i am doing wrong here is the code:
$db = mysql_pconnect(connect info);
Along with
I am new to php and that the folowing error: Warning: mysql_num_rows():
supplied argument is not a valid MySQL result resource in
/home/tbonestu/public_html/smallimages.php
i dont know what i am doing wrong here is the code:
$db = mysql_pconnect(connect info);
mysql_select_db(images);
Hi,
Sunday, September 23, 2001, 3:25:02 PM, you wrote:
NV I am new to php and that the folowing error: Warning: mysql_num_rows():
NV supplied argument is not a valid MySQL result resource in
NV /home/tbonestu/public_html/smallimages.php
NV i dont know what i am doing wrong here is the code:
NV
Mh,
right yet I have another problem. I want to select a username an a =
password from a database. The Values for tghe select are stored in a =
session variable.
And my problem is, that when I run the Query there is no difference in =
the mysql_num_rows($Result)
it both time (When the User is
In your database design you need the following
every username/pass comb is unique.
so a query like ... WHERE username='$testvalue' AND password='$testvalue2'
Have to give you one row for a good user/passcombination ALWAYS. And 0 rows
for a wrong combination.
If NOT your design doesn;t fit
This is my query with some dummy loginformations:
SELECT * FROM benutzer_db where Benutzername = 'Herbert' AND Passwort = 'hals'
and this is the code i use for the database transaction:
$Query = SELECT * FROM benutzer_db where Benutzername = '.$SESSION['nickname'].' ;
$Query .= AND Passwort =
On Thursday 15 August 2002 07:35, Sascha Braun wrote:
This is my query with some dummy loginformations:
SELECT * FROM benutzer_db where Benutzername = 'Herbert' AND Passwort =
'hals'
and this is the code i use for the database transaction:
$Query = SELECT * FROM benutzer_db where
The function below works when I pass in a valid username and password and
returns '1'. When I pass a username and password that is not in the database
it still returns '1'. I have put some echo statements in for debugging and
the value of $numresult is always '1'. Does mysql_num_rows retain
-
From: Mark Colvin [mailto:[EMAIL PROTECTED]]
Sent: 18. kesäkuuta 2002 15:00
To: [EMAIL PROTECTED]
Subject: [PHP] mysql_num_rows always returns 1?
The function below works when I pass in a valid username and password
and returns '1'. When I pass a username and password that is not in the
database
At 13:00 18-06-02 +0100, Mark Colvin wrote:
The function below works when I pass in a valid username and password and
returns '1'. When I pass a username and password that is not in the database
it still returns '1'. I have put some echo statements in for debugging and
the value of $numresult is
$query = select count(*) from users where
You are asking for a count() in your query. This will always give you
one row returned with a count. If you really want to do this you should
probably have:
$query = select count(*) as usercount from users where
Then you can do your tests
Hiya!,
Does anyone know whether mysql_num_rows is zero or one based?
that is, if I have 5 records will mysql_num_rows() return 4 or 5?
Thanks in advance!,
Dw.
(I did check the php.net and MySQL manual for mysql_num_rows,
php.net dosent say and MySQL only gives a one line description, which is
[snip]
Does anyone know whether mysql_num_rows is zero or one based?
[/snip]
It's one based.
Jay
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
It's 1 based. It returns the number of rows. Not the index of the last
row. (Which would be 0 based.)
On Fri, 2002-06-07 at 19:23, William_dw -- Sqlcoders wrote:
Hiya!,
Does anyone know whether mysql_num_rows is zero or one based?
that is, if I have 5 records will mysql_num_rows() return 4
Hi list,
I have a class to perform my tasks to bd, among than there's this function
function executa($sql=) {
if($sql == ) {
$this-resultado = 0;
$this-numrows = 0;
$this-row = -1;
}
$this-resultado =
with insert, update and delete you must use mysql_affected_rows()
- Original Message -
From: Rodrigo Peres [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 4:58 PM
Subject: [PHP] php mysql_num_rows problem
Hi list,
I have a class to perform my tasks
with insert, update and delete you must use mysql_affected_rows()
http://www.php.net/manual/en/function.mysql-affected-rows.php
- Original Message -
From: Rodrigo Peres [EMAIL PROTECTED]
To: PHP [EMAIL PROTECTED]
Sent: Wednesday, February 27, 2002 4:58 PM
Subject: [PHP] php
Thanks to everyone that helped me with my last problem I've run into
another problem and was wondering if someone here could offer any help or
suggestions. The project I'm working on is an event calender. It does
several things but the problem I've run into is when I click a date on the
]
Subject: [PHP] Mysql_num_rows
Thanks to everyone that helped me with my last problem I've run into
another problem and was wondering if someone here could offer any help
or
suggestions. The project I'm working on is an event calender. It does
several things but the problem I've run into is when
Please show your exact code, because your code snippet looks right.
Then, again, maybe it's because it's an Aggie machine...GRIN
-Original Message-
From: Niklas Lampén [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 18, 2002 8:11 AM
To: Php-General
Subject: RE: [PHP] Mysql_num_rows
Emery [mailto:[EMAIL PROTECTED]]
Sent: 18. helmikuuta 2002 16:27
To: Php-General; ':[EMAIL PROTECTED]'
Subject: RE: [PHP] Mysql_num_rows
Please show your exact code, because your code snippet looks right.
Then, again, maybe it's because it's an Aggie machine...GRIN
-Original Message
At 06:05 AM 2/18/2002 Monday, Frank Miller wrote:
Next I say if ($num == 0)
{
echo There are no events scheduled today!;
}
else
{
echo blah, blah, blah;
}
Try this
if (empty($num))
echo Nothing today!;
else
echo blah, blah, blah;
I believe in PHP if a
60 matches
Mail list logo