<?php

$hoy = getdate();
//print_r($hoy);

$_SESSION['unico'] = $hoy["hours"] . $hoy["minutes"] . $hoy["seconds"] . rand();

$sql99 = "create table tmp.`" . $_SESSION['unico'] . "` select '1234567890' as id_pack,

			id,
				op_id,
				tipo_p_id,
				monto	,
				detalle,
				id_bancosg	,
				gift_number,
				gift_calc	,
				id_forma	,
				trig_unic,
				e_id	,
				op_id_espe,
				mon_op,
				mon_taza_op	,
				mon_id1,
				mon_taza1,
				mon_id2	,
				mon_taza2	,
				mon_id3,
				mon_taza3,
				syncprocesing,
				usermodify	,
				useroption

				  from	" . $database . ".operacion_det_pago   limit 0 ";

$sqlinsert = "INSERT INTO tmp." . $_SESSION['unico'] . "  (
					 id	,
            op_id	,
            tipo_p_id	,
            monto	,
            detalle	,
            id_bancosg	,
            gift_number	,
            gift_calc	,
            id_forma	,
            trig_unic	,
            e_id	,
            op_id_espe	,
            mon_op	,
            mon_taza_op	,
            mon_id1	,
            mon_taza1	,
            mon_id2	,
            mon_taza2	,
            mon_id3	,
            mon_taza3	,
            syncprocesing	,
            usermodify	,
            useroption,id_pack) VALUES (";
