|
|
|
แก้คิวรีให้แล้วไม่ออก แต่เมื่อแก้กลับเหมือนเดิมก็ยังไม่ออก |
|
|
|
|
|
|
|
เอาโค้ดมาดูก่อนดีไหมคะ
|
|
|
|
|
Date :
2010-01-11 08:50:13 |
By :
ultrasiam |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
โค้ดจากหน้าเวบ
<select name="ddlPersonID" onchange="this.form.submit();">
<option value="-1">-- เลือก ผู้ปฏิบัติงาน --</option>
<?
$rs_p = $personObj->GetPersonInTimeSheetByCond($_GET[ddlContractID], $_SESSION[orgID]
,$_GET[ddlYear], $_GET[ddlMonth]);
echo $utilObj->GetDDL($rs_p, "personid", "name", $_GET[ddlPersonID]);
?>
</select>
////////////////////////////////
class---Persons---
$sql = sprintf("SELECT personID, name
FROM Persons
WHERE personID
IN (
SELECT DISTINCT t.personID
FROM timesheets t, workcontracts w
WHERE t.personID
IN (
SELECT personID
FROM (
SELECT *
FROM workcontracts d
WHERE YEAR( d.finishDate ) >= '$year'
AND YEAR( d.startDate ) <= '$year'
AND d.orgID = '$orgID'
)s
WHERE (
if( YEAR( s.finishDate ) = '$year', MONTH( s.finishDate ) >= '$month'
AND MONTH( s.startDate ) >= '$month', MONTH( s.startDate ) like '%')
)
)
AND t.personID = w.personID
AND t.contractID = w.contractID
AND t.contractID = '$contractID'
AND MONTH( t.WorkDate ) = '$month'
AND YEAR( t.WorkDate ) = '$year'
) ");
//, $contractID, $orgID, $month, $year);
//echo $sql;
$rs = $db->queryAll($sql);
/////////////////////////////////////////
|
|
|
|
|
Date :
2010-01-11 09:00:03 |
By :
fossil05 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 00
|