Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkunitconversionexist($itemid,$itemunits){
- for($i=0; $i<count($itemid); $i++){
- $finditemsinfos=DB::table('items')->Where('id',$itemid[$i])->first();
- if($finditemsinfos->unit == $itemunits[$i]){
- return 1;
- } else {
- $chkunitconversionexist=DB::table('unitconversion')->Where('itemsid',$itemid[$i])->Where('unit_name',$finditemsinfos->unit)->Where('subunit_name',$itemunits[$i])->get();
- if(count($chkunitconversionexist) > 0){
- return 1;
- } else {
- return 0;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement