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
Hello Gary, Please wrap $i in braces in your variable variable: if ( isset($_POST[county{$i}] ) ) { echo You have chosen . $_POST[county{$i}]. br/; -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter:

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

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...

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

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

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

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

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
Are you actually checking that the query result is valid? $conn = mysql_connect('localhost', xxx, yyy) or die('Could not connect to db'); $result = mysql_query('select * from blah', $conn); if ($result) { echo Number of rows: . mysql_num_rows($result); if (mysql_num_rows($result) 0) {

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

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 =

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 (or

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

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

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

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

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

RE: [PHP] mysql_num_rows always returns 1?

2002-06-18 Thread Niklas Lampén
Try $query = select count(*) as Lines from users where and then check the value of Lines. Or then do something like $query = select ID from users where and now your mysql_num_rows($result) should return right kinda value. Niklas -Original Message-

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

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

RE: [PHP] Mysql_num_rows

2002-02-18 Thread Niklas Lampén
Maybe you can round the problem with if ($num 1) echo Nothing today!; else echo Something to do today!; if (!isset($num) || $num == 0)... Niklas -Original Message- From: Frank Miller [mailto:[EMAIL PROTECTED]] Sent: 18. helmikuuta 2002 16:05 To: [EMAIL PROTECTED]

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