RE: [PHP] MySQL QUERY Results Not Appearing[Scanned]

2004-07-02 Thread Michael Egan
Glad to be of help. I'm sure there will be many more occasions when I'm badly in need of assistance. Cheers, Michael -Original Message- From: Harlequin [mailto:[EMAIL PROTECTED] Sent: 02 July 2004 13:55 To: [EMAIL PROTECTED] Subject: Re: [PHP] MySQL QUERY Results Not Appeari

Re: [PHP] MySQL QUERY Results Not Appearing[Scanned]

2004-07-02 Thread Harlequin
Michael just wanted to thank you through the group for your time. U R A Star...! -- - Michael Mason Arras People www.arraspeople.co.uk - "Michael Egan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Have a look at the mysql

RE: [PHP] MySQL QUERY Results Not Appearing[Scanned]

2004-06-30 Thread Michael Egan
Have a look at the mysql functions in the PHP manual - i.e. http://uk.php.net/mysql_query I'm also certain this question has been raised fairly recently on the list. All mysql_query is going to do is either open up the resource or not. You'll need to use something else to display the data. For

Re: [PHP] MYSQL Query results in pages

2004-06-25 Thread Geethanandh Kandasamy
No other way. Use one query to count the total record and then another query for limiting -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MYSQL Query results in pages

2004-06-24 Thread Matt Matijevich
[snip] Is this right? Is there other efficent way to do it? What about if data changes (i.e. new records are added) while the user browses through pages? [/snip] on each page do a: SELECT count(*) FROM table WHERE your_condition this will give you your total number of results -- PHP General Ma

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Justin French wrote: > $sql = "SELECT * FROM news ORDER BY id DESC LIMIT $limit"; You're forgetting (or just didn't read my code), I'm UPDATE-ing, not SELECT-ing. mysql_num_rows() doesn't work on UPDATE. Anyway, thanks to Rasmus for pointing out my error. -- H | "Life is the art of

Re: [PHP] MySQL query results

2002-03-22 Thread Justin French
FWIW, straight from my code, with a few snips: Justin French -- http://indent.com.au http://soundpimps.com http://hinge.net.au "Ashley M. Kirchner" wrote: > > Rasmus Lerdorf wrote: > > > But did you read the documentation? It states: > > Yes. But, reading it, and my br

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Rasmus Lerdorf wrote: > But did you read the documentation? It states: Yes. But, reading it, and my brain actually registering what I was reading, now that's a different story. :) It _is_ Friday after all. Thanks! -- H | "Life is the art of drawing without an eraser." - John Gardner

Re: [PHP] MySQL query results

2002-03-22 Thread Rasmus Lerdorf
But did you read the documentation? It states: int mysql_affected_rows ( [resource link_identifier]) That's an optional link identifier. You don't feed it a result resource. Just call it without any arguments. The affected rows is tied to a database connection, not a result set. -Rasmus On

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Chris wrote: > oops. i see then my previous mail will not help in this case. wasn't > there something called 'affected_rows'? search the online manual for > 'affected'. I did. Read my reply to Rasmus as well. :) At this rate, I may just say to heck with the $result, and always assume some

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Chris wrote: > > The query does get executed, and the record does get changed. > > seems there is something wrong with the query, can you either echo the query and > feed it directly to mysql, (e.g. in phpmyadmin) see what happens? Nope, the query's fine. I can run it manually, and thro

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Rasmus Lerdorf wrote: > http://www.php.net/manual/en/function.mysql-affected-rows.php Thanks Rasmus. I did try that as well, same result. If I don't bother with the $result, everything's fine. Like I said, the query runs, and gets executed. The DB field gets changed as it should and all.

Re: [PHP] MySQL query results

2002-03-22 Thread Chris
oops. i see then my previous mail will not help in this case. wasn't there something called 'affected_rows'? search the online manual for 'affected'. On 22 Mar 2002 at 17:09, Ashley M. Kirchner wrote: > > After a bit of research: > > -- > Rick Emery wrote: > > > $result = mys

Re: [PHP] MySQL query results

2002-03-22 Thread Rasmus Lerdorf
http://www.php.net/manual/en/function.mysql-affected-rows.php On Fri, 22 Mar 2002, Ashley M. Kirchner wrote: > > After a bit of research: > > -- > Rick Emery wrote: > > > $result = mysql_query(.)' > > mysql_num_rows($result) > > Hrm, this is resulting in: > > Warning: Supp

Re: [PHP] MySQL query results

2002-03-22 Thread Chris
On 22 Mar 2002 at 16:41, Ashley M. Kirchner wrote: > Rick Emery wrote: > The query does get executed, and the record does get changed. > > The code looks like this: > > $conn = @MYSQL_CONNECT($host,$user,$password) ; > mysql_select_db($database, $conn); > $query = "UPDATE clients

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
After a bit of research: -- Rick Emery wrote: > $result = mysql_query(.)' > mysql_num_rows($result) Hrm, this is resulting in: Warning: Supplied argument is not a valid MySQL result resource in ./index.php on line 16 Rows -- Rightfully so. mysql_qu

Re: [PHP] MySQL query results

2002-03-22 Thread Ashley M. Kirchner
Rick Emery wrote: > $result = mysql_query(.)' > mysql_num_rows($result) Hrm, this is resulting in: Warning: Supplied argument is not a valid MySQL result resource in ./index.php on line 16 Rows The query does get executed, and the record does get changed. The code looks like

RE: [PHP] MySQL query results

2002-03-22 Thread Rick Emery
$result = mysql_query(.)' mysql_num_rows($result) -Original Message- From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED]] Sent: Friday, March 22, 2002 5:28 PM To: PHP-General List Subject: [PHP] MySQL query results How can I tell whether anything was matched and changed after a