Jump to content

Archived

This topic is now archived and is closed to further replies.

shan_cool

search criteria

Recommended Posts

Hi All,

I am designing a form which has 3 text boxes and 21 combo boxes.It is a search engine where none of the fields are mandatory.I am using PHP with MYSQL 3.23,The purpose of this form is to check for the Employees who have Total Experience,Company experience and other experience.These 3 are Text boxes.
The rest 21 combo boxes are various skill rating. Now i have to retrieve the employee Details based on the various combinations of text and combo boxes.

As for now i have just tried the below if condition,which works fine

php code

[code]<?php
if( $tot_exp <> NULL  && $mav_exp == NULL && $dev_exp == NULL && $core_banking == NULL....)
{
$result = mysql_query("SELECT  (TO_DAYS(CURRENT_DATE()) -TO_DAYS(Emp_DOJ))/365 as mav_exp,(TO_DAYS(CURRENT_DATE())

-TO_DAYS(Emp_DOJ))/365 + Test_Exp  as tot_test,h.Emp_DOJ,s.Emp_Id as Emp_Id,s.Emp_Name as Emp_Name,s.Desgn as Desgn,s.Qual as

Qual,s.Test_Exp,s.Dev_Exp,s.Other_Exp
FROM skill_master s,HR_Emp_Det h where h.Emp_Id =s.Emp_Id and  (TO_DAYS(CURRENT_DATE()) -TO_DAYS(Emp_DOJ))/365 + Test_Exp

>='$tot_exp'",$connection) or die ("Can not do it1");
$rs = mysql_num_rows($result);
}
?>[/code]
but if i consider the above method for various combinations my code becomes very large and write more if conditions...

My backend MYSQL does not support Sub queries,Is there anyother way to implement this???

Thanks in advance,
Shan

[b]EDIT BY OBER: PLEASE USE CODE TAGS WHEN POSTING CODE[/b]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.