
06-18-2005, 03:33 PM
|
|
SEO
|
|
Join Date: May 2005
Posts: 121

|
|
|
Help with Counting Results
I don't write php very often. I know this is a simple question, but I was hoping someone could help.
PHP Code:
$query = "SELECT *
FROM student
ORDER BY student_id DESC
LIMIT 50";
$result = mysql_query($query) or die("Query failed");
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
print "<strong>Request made ".$row["date_added"]."</strong> by ".$row["student_firstname"]." ".$row["student_lastname"]." from ".$row["student_city"]." ".$row["student_zipcode"]."<br />".$row["student_message"]."<br /><br />";
}
I want say:
1) The search yielded x results
2) If no results, then print alternate message
I appreciate your time. Thank you in advance for your help. 
__________________
Marketing Content - an effective plan in increasing interest in your content
Viral Content - Develop content that gets shared and saves you time marketing
|