setQuery("SELECT fam,ref,desc,cant,pvp,incr,sub FROM presupuestados_cascos_y_accesorios, 1 AS from_t WHERE presupuesto=? UNION "
"SELECT fam,ref,desc,cant,pvp,incr,sub, 2 AS from_t FROM presupuestados_complementos WHERE presupuesto=? UNION "
"SELECT fam,ref,desc,cant,pvp,incr,sub, 3 AS from_t FROM presupuestados_puertas_y_cajones WHERE presupuesto=? UNION "
"SELECT fam,ref,desc,cant,pvp,incr,sub, 4 AS from_t FROM presupuestados_electrodomesticos WHERE presupuesto=?;");
setQuery("SELECT fam,ref,desc,cant,pvp,incr,sub FROM presupuestados_cascos_y_accesorios, 1 AS from_t WHERE presupuesto=? UNION "
"SELECT fam,ref,desc,cant,pvp,incr,sub, 2 AS from_t FROM presupuestados_complementos WHERE presupuesto=? UNION "
"SELECT fam,ref,desc,cant,pvp,incr,sub, 3 AS from_t FROM presupuestados_puertas_y_cajones WHERE presupuesto=? UNION "
"SELECT fam,ref,desc,cant,pvp,incr,sub, 4 AS from_t FROM presupuestados_electrodomesticos WHERE presupuesto=?;");
To copy to clipboard, switch view to plain text mode
and use field from_t to detect db table.
Bookmarks