Re: [PHP] mysql_num_rows()

2011-02-25 Thread tedd
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

Re: [PHP] mysql_num_rows()

2011-02-22 Thread Daniel Molina Wegener
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

Re: [PHP] mysql_num_rows()

2011-02-22 Thread Andre Polykanine
/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

Re: [PHP] mysql_num_rows()

2011-02-22 Thread Gary
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

Re: [PHP] mysql_num_rows()

2011-02-22 Thread Gary
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

[PHP] mysql_num_rows()

2011-02-21 Thread Gary
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 (

Re: [PHP] mysql_num_rows()

2011-02-21 Thread Deva
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...

[PHP] mysql_num_rows

2006-05-30 Thread John Taylor-Johnston
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 =

Re: [PHP] mysql_num_rows

2006-05-30 Thread Richard Lynch
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

[PHP] mysql_num_rows()

2004-09-27 Thread PHP Junkie
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

Re: [PHP] mysql_num_rows()

2004-09-27 Thread M. Sokolewicz
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:

RE: [PHP] mysql_num_rows()

2004-09-27 Thread Jay Blanchard
[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

Re: [PHP] mysql_num_rows()

2004-09-27 Thread Jason Wong
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

[PHP] mysql_num_rows

2003-08-15 Thread John Taylor-Johnston
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

Re: [PHP] mysql_num_rows

2003-08-15 Thread John W. Holmes
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

[PHP] mysql_num_rows

2003-04-04 Thread Mike Tuller
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 =

Re: [PHP] mysql_num_rows

2003-04-04 Thread J J
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 =

Re: [PHP] mysql_num_rows

2003-04-04 Thread J J
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 =

RE: [PHP] mysql_num_rows

2003-04-04 Thread John W. Holmes
$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

Re: [PHP] mysql_num_rows

2003-04-04 Thread Mike Tuller
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

Re: [PHP] mysql_num_rows

2003-04-04 Thread [EMAIL PROTECTED]
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.

Re: [PHP] mysql_num_rows

2003-04-04 Thread Kevin Stone
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

[PHP] mysql_num_rows() error

2003-01-09 Thread Phil Powell
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

RE: [PHP] mysql_num_rows() error

2003-01-09 Thread Jay \(PHP List\)
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

RE: [PHP] mysql_num_rows() error

2003-01-09 Thread Sean Malloy
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

RE: [PHP] mysql_num_rows() error

2003-01-09 Thread Mark Charette
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

[PHP] mysql_num_rows

2002-12-17 Thread Roger Lewis
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 =

Re: [PHP] mysql_num_rows

2002-12-17 Thread Philip Olson
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 =

[PHP] mysql_num_rows

2002-11-21 Thread empty
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:

Re: [PHP] mysql_num_rows

2002-11-21 Thread Chris Shiflett
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

RE: [PHP] mysql_num_rows

2002-11-21 Thread M.A.Bond
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

Re: [PHP] mysql_num_rows

2002-11-21 Thread Sascha Cunz
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

Re: [PHP] mysql_num_rows

2002-11-21 Thread Marek Kilimajer
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

[PHP] mysql_num_rows error

2002-10-08 Thread Omar Campos
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

Re: [PHP] mysql_num_rows error

2002-10-08 Thread Stuart Dallas
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

Re: [PHP] mysql_num_rows error

2002-10-08 Thread Wilmar Perez
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 =

RE: [PHP] mysql_num_rows error

2002-09-23 Thread John Holmes
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);

RE: [PHP] mysql_num_rows error

2002-09-23 Thread M . A . Bond
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);

RE: [PHP] mysql_num_rows error

2002-09-23 Thread Jon Haworth
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

[PHP] mysql_num_rows error

2002-09-22 Thread Nick Varner
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);

Re: [PHP] mysql_num_rows error

2002-09-22 Thread Tom Rogers
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

[PHP] mysql_num_rows($Result)

2002-08-14 Thread Sascha Braun
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

Re: [PHP] mysql_num_rows($Result)

2002-08-14 Thread Bas Jobsen
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

[PHP] mysql_num_rows();

2002-08-14 Thread Sascha Braun
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 =

Re: [PHP] mysql_num_rows();

2002-08-14 Thread Jason Wong
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

[PHP] mysql_num_rows always returns 1?

2002-06-18 Thread Mark Colvin
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

RE: [PHP] mysql_num_rows always returns 1?

2002-06-18 Thread Niklas Lampén
- 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

Re: [PHP] mysql_num_rows always returns 1?

2002-06-18 Thread Eugene Mah
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

RE: [PHP] mysql_num_rows always returns 1?

2002-06-18 Thread David Freeman
$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

[PHP] mysql_num_rows()

2002-06-07 Thread William_dw -- Sqlcoders
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

RE: [PHP] mysql_num_rows()

2002-06-07 Thread Jay Blanchard
[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

Re: [PHP] mysql_num_rows()

2002-06-07 Thread Matthew Walker
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

[PHP] php mysql_num_rows problem

2002-02-27 Thread Rodrigo Peres
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 =

Re: [PHP] php mysql_num_rows problem

2002-02-27 Thread Pascal Polleunus
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

Re: [PHP] php mysql_num_rows problem

2002-02-27 Thread Pascal Polleunus
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

[PHP] Mysql_num_rows

2002-02-18 Thread Frank Miller
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

RE: [PHP] Mysql_num_rows

2002-02-18 Thread Niklas Lampén
] 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

RE: [PHP] Mysql_num_rows

2002-02-18 Thread Rick Emery
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

RE: [PHP] Mysql_num_rows

2002-02-18 Thread Niklas Lampén
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

Re: [PHP] Mysql_num_rows

2002-02-18 Thread Phillip S. Baker
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