kolejne dwa problemy pierwszy to taki że nawet jeśli w pętli mam if to i tak wszystko wyrzuca w divach kolorowanych pod ładunki , pojazdy powinny być w zielonych a są takie same jak ładunki.
zapytanie
$sql = "(select cargoActive,cargoAddingTime,cargoCountry,cargoCode,cargoPlace,cargoDatetime,carg
oCountrySecond,cargoCodeSecond,cargoPlaceSecond,cargoDatetimeSecond,
id_log,uniqID,cname,cowner,cstreet,cplace,name,surname,direct,phone,direct2,fax,
email,
cargoTypeBuild,cargoCargo,cargoLoadCargo,cargoPalette,cargoBid,cargoCurrency,car
goCheckCargo,cargoWidth,cargoHeight,cargoLenght,cargoVolume,cargoLoadType,cargoCa
rgoType,cargoWhat1,cargoWhat2,cargoWhat3,cargoWhat4,cargoWhat5,cargoWhat6,cargoWh
at7,cargoWhat8,cargoText
from cargoAdd join user on user.id_log=cargoAdd.userID join cargoAddInfo on cargoAddInfo.uniqID=cargoAdd.id join payment on payment.userID=user.id_log where cargoActive = 1 AND cargoDatetime >= NOW() AND leftTime >= NOW() LIMIT 0,50)
UNION
(select vehicleActive,vehicleAddingTime,vehicleCountry,vehicleCode,vehiclePlace,vehicleD
atetime,vehicleCountrySecond,vehicleCodeSecond,vehiclePlaceSecond,vehicleDatetime
Second,
id_log,uniqID,cname,cowner,cstreet,cplace,name,surname,direct,phone,direct2,fax,
email,
vehicleTypeBuild,vehicleCargo,vehicleLoadCargo,0,vehicleBid,vehicleCurrency,0,ve
hicleWidth,vehicleHeight,vehicleLenght,vehicleVolume,vehicleLoadType,0,vehicleWha
t1,vehicleWhat2,vehicleWhat3,vehicleWhat4,vehicleWhat5,vehicleWhat6,vehicleWhat7,
vehicleWhat8,vehicleText
from vehicleAdd join user on user.id_log=vehicleAdd.userID join vehicleAddInfo on vehicleAddInfo.uniqID=vehicleAdd.id join payment on payment.userID=user.id_log where vehicleActive = 1 AND vehicleDatetime >= NOW() AND leftTime >= NOW() ORDER by cargoDatetime, vehicleDatetime ASC)
";
//potem robie //
{
if (isset($row['cargoActive'])) { //jeśli są ładunki//
}else{
//jeśli pojazdy//
}
Drugi błąd to zliczanie danych w bazie bląd Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /newsearch.php on line 1181
$sql = "(select COUNT(*) from cargoAdd join user on user.id_log=cargoAdd.userID join cargoAddInfo on cargoAddInfo.uniqID=cargoAdd.id join payment on payment.userID=user.id_log where cargoActive = 1 AND cargoDatetime >= NOW() AND leftTime >= NOW())
UNION
(select COUNT(*) from vehicleAdd join user on user.id_log=vehicleAdd.userID join vehicleAddInfo on vehicleAddInfo.uniqID=vehicleAdd.id join payment on payment.userID=user.id_log where vehicleActive = 1 AND vehicleDatetime >= NOW() AND leftTime >= NOW())
";
?