i think u have to use mysql_num_rows function. e.g. $result = mysql_query($query); $num_rows = mysql_num_rows($result);
(where $num_rows is the no. of rows in result set) for detailed information u may visit http://phpinterviewanswers.blogspot.com/ On Wed, Apr 2, 2008 at 11:53 AM, snehashendure <[EMAIL PROTECTED]> wrote: > HEy ppl, > I am doing a task were i need to check whether a person > requesting services is a valid employee. The details of the requesting > person are stored in table "REQUEST" and the employee db is > in "EMPLOYEE". > For verifying individual requests I have to check if a given > empid in REQUEST is present in EMPLOYEE. > > What I thought of doing is that i store the empid from Request in a var > temp and then execute the query : > $query=select empid from EMPLOYEE where empid ==temp; > > If the empid in REQUEST is not present in EMPLOYEE I get an empty query > my doubt is > > "HOW DO I IDENTIFY THAT THE QUERY RESULT IS EMPTY?" > > > [Non-text portions of this message have been removed]
