1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| <?php
function lastBetsClosed()
{
$db = dbConnect();
$req = $db->query('SELECT user_id ,event,null AS event_1,null AS event_2,null AS event_3,null AS event_4,sport,null AS sport_1,null AS sport_2,null AS sport_3,null AS sport_4,date_event,null AS date_event_1,null AS date_event_2,null AS date_event_3,null AS date_event_4,hour_event,null AS hour_event_1,null AS hour_event_2,null AS hour_event_3,null AS hour_event_4,type,cost,null AS cost_1,null AS cost_2,null AS cost_3,null AS cost_4,stake,prognosis,null AS prognosis_1,null AS prognosis_2,null AS prognosis_3,null AS prognosis_4,competition,null AS competition_1,null AS competition_2,null AS competition_3,null as competition_4,result
FROM bet_simple
UNION
SELECT user_id,null AS event,event_1,event_2,event_3,event_4,null AS sport,sport_1,sport_2,sport_3,sport_4,null AS date_event,date_event_1,date_event_2,date_event_3,date_event_4,null AS hour_event,hour_event_1,hour_event_2,hour_event_3,hour_event_4,type,cost,cost_1,cost_2,cost_3,cost_4,stake,null AS prognosis,prognosis_1,prognosis_2,prognosis_3,prognosis_4,null as competition,competition_1,competition_2,competition_3,competition_4,result
FROM bet_combi
UNION ');
return $req;
} |