Array
(
)

Consulta de todas as tabelas do BD

Pirilampos
   - 25 ago 2009

Como eu consigo chamar todas as tabelas do banco de dados chamando o Ultimo registro feito??

fiz assim mas nao deu certo...

loConsulta.Open ´SELECT NCampanha AS NDocumento, Titulo AS NNome, ´Campanha´ AS Tipo FROM Campanhas ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NMaterial AS NDocumento, Nome AS NNome, ´Material´ AS Tipo FROM Materiais ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NPromocao AS NDocumento, Titulo AS NNome, ´Promocao´ AS Tipo FROM Promocoes ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NManual AS NDocumento, Titulo AS NNome, ´Manual´ AS Tipo FROM Manuais ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NTreinamento AS NDocumento, Titulo AS NNome, ´Treinamento´ AS Tipo FROM Treinamentos ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NSeLigue AS NDocumento, Titulo AS NNome, ´SeLigue´ AS Tipo FROM SeLigues ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NManualPos AS NDocumento, Titulo AS NNome, ´ManualPos´ AS Tipo FROM ManuaisPos ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NTaxasAdministradora AS NDocumento, Titulo AS NNome, ´TaxasAdministradora´ AS Tipo FROM TaxasAdministradoras ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NContato AS NDocumento, Titulo AS NNome, ´Contato´ AS Tipo FROM Contatos ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NProduto AS NDocumento, Nome AS NNome, ´Produto´ AS Tipo FROM Produtos ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NTabela AS NDocumento, Titulo AS NNome, ´TabelaProduto´ AS Tipo FROM Tabelas ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NRanking AS NDocumento, Titulo AS NNome, ´Ranking´ AS Tipo FROM Rankings ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NRelatorio AS NDocumento, Titulo AS NNome, ´FiqueAtento´ AS Tipo FROM Relatorios ORDER BY UA DESC LIMIT 0, 3)´
loConsulta = loConsulta & ´ UNION ALL (SELECT NDeuCerto AS NDocumento, Titulo AS NNome, ´DeuCerto´ AS Tipo FROM DeuCertos ORDER BY UA DESC LIMIT 0, 3)´, loConexao

Pirilampos
   - 25 ago 2009

tenho que chamar os ultimos 3 registros atualizados de todas as tabelas...

me ajude por favor.

Grato.

Pirilampos
   - 25 ago 2009

consegui resolver... nao precisa mais :D