Re: [PHP-DB] Question: For no results

2004-12-03 Thread graeme
You might want to use: mysql_num_rows function.mysql-num-rows.html -- Get number of rows in result Stuart Felenstein wrote: I want to send back a message when no matches are found on my search page. Basically No matches found. I assumed that mysql_fetch_assoc would be the determining factor

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 03 December 2004 14:39, Stuart Felenstein wrote: I want to send back a message when no matches are found on my search page. Basically No matches found. I assumed that

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
The closing ? of a PHP segment also implies an end-of-statement semicolon -- so the above is equivalent to: if ($row_rsCS == false) ; ? Which, of course, means that the scope of the if doesn't extend to anything beyond this point. You need to mark the block controlled by the

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 03 December 2004 15:06, Stuart Felenstein wrote: The closing ? of a PHP segment also implies an end-of-statement semicolon -- so the above is equivalent to: if

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 03 December 2004 15:16, Stuart Felenstein wrote: --- Stuart Felenstein [EMAIL PROTECTED] wrote: The reason the close is there is because the next line of code is the

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
--- Ford, Mike [EMAIL PROTECTED] wrote: Well, your taste seems to be to use { }, so :-endif is irrelevant. Alright it's Friday, I'm punchy but we're all in a good mood ! Yes, I like the closing curlies So, then where do these lovely ladies go here ? if ($row_rsCS == false) { p

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 03 December 2004 15:26, Stuart Felenstein wrote: --- Ford, Mike [EMAIL PROTECTED] wrote: Well, your taste seems to be to use { }, so :-endif is irrelevant. Alright it's

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Ford, Mike
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 03 December 2004 15:26, Stuart Felenstein wrote: --- Ford, Mike [EMAIL PROTECTED] wrote: Well, your taste seems to be to use { }, so :-endif is irrelevant. Alright it's

RE: [PHP-DB] Question: For no results

2004-12-03 Thread Stuart Felenstein
--- Ford, Mike [EMAIL PROTECTED] wrote: And, by the way, why on earth are you using a print_r an a straight literal string? Seems to me you could just put that text in as part of the HTML: if ($row_rsCS == false) { ? p align=centerstrongNo Matches Found/strong/p ?php