本文整理匯總了PHP中Conexao::queryAllAssoc方法的典型用法代碼示例。如果您正苦於以下問題:PHP Conexao::queryAllAssoc方法的具體用法?PHP Conexao::queryAllAssoc怎麽用?PHP Conexao::queryAllAssoc使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Conexao
的用法示例。
在下文中一共展示了Conexao::queryAllAssoc方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: implode
// Dropar Sequences que em comparação ao Dev estejam à mais
$comparaListaSequence = array_diff($sequencesHomolog, $sequencesDev);
$arquivo->gravar("------ DROP DE SEQUENCES ------");
if (isset($comparaListaSequence)) {
$arquivo->gravar("\nDROP SEQUENCE " . implode("\nDROP SEQUENCE ", $comparaListaSequence) . "\n\n");
}
// loop das tabelas do schema
foreach ($resultadoTableDev as $table) {
// Lista dos CAMPOS
$resultadoDev = $dev->queryAll($colunaQuery . "'{$table}'");
$resultadoHomolog = $homolog->queryAll($colunaQuery . "'{$table}'");
// Cria um arquivo com um comentario contendo a tabela analisada em questão
$arquivo->gravar("\n\n------------- TABELA: {$table} -------------\n\n");
//Dropar as CONSTRAINTS do Homolog que em comparação ao ambiente de desenvolvimento esta à mais
$devConstraintArrayAssoc = $dev->queryAllAssoc($constraintQuery . "'{$table}'");
$homologConstraintArrayAssoc = $homolog->queryAllAssoc($constraintQuery . "'{$table}'");
$constraint = new Constraint($devConstraintArrayAssoc, $homologConstraintArrayAssoc, $table);
$arquivo->gravar($constraint->dropConstraints() . "\n\n");
// Dropar COLUNAS do Homolog que em comparação ao ambiente de desenvolvimento esta à mais
$devColunaArrayAssoc = $dev->queryAllAssoc($colunaQuery . "'{$table}'");
$homologColunaArrayAssoc = $homolog->queryAllAssoc($colunaQuery . "'{$table}'");
$coluna = new Coluna($devColunaArrayAssoc, $homologColunaArrayAssoc, $table);
$arquivo->gravar($coluna->dropColunas() . "\n\n");
// Verificar se o nome da coluna da tabela Dev e Homolog são iguais e os atributos são iguais
// não considerando a mesma posição onde se encontram
for ($i = 0; $i < count($resultadoDev); $i++) {
$nomeColunaDev = $resultadoDev[$i][0];
$existeCampo = "nao";
$addTable = array();
$existePropriedade = 1;
for ($j = 0; $j < count($resultadoHomolog); $j++) {
示例2:
}
if (isset($devConstraintArrayAssoc[$i]['delete_rule'])) {
$devConstraintName[$devConstraintArrayAssoc[$i]['constraint_name']]['delete_rule'] = $devConstraintArrayAssoc[$i]['delete_rule'];
}
if (isset($devConstraintArrayAssoc[$i]['consrc'])) {
$devConstraintName[$devConstraintArrayAssoc[$i]['constraint_name']]['consrc'] = $devConstraintArrayAssoc[$i]['consrc'];
}
if (isset($devConstraintArrayAssoc[$i]['foreign_table_name'])) {
$devConstraintName[$devConstraintArrayAssoc[$i]['constraint_name']]['foreign_table_name'] = $devConstraintArrayAssoc[$i]['foreign_table_name'];
}
if (isset($devConstraintArrayAssoc[$i]['foreign_column_name'])) {
$devConstraintName[$devConstraintArrayAssoc[$i]['constraint_name']]['foreign_column_name'] = $devConstraintArrayAssoc[$i]['foreign_column_name'];
}
}
$devteste = $devConstraintName;
$devConstraintArrayAssoc = $homolog->queryAllAssoc($constraintQuery . "'tabela3'");
for ($i = 0; $i < count($devConstraintArrayAssoc); $i++) {
if (isset($devConstraintArrayAssoc[$i]['constraint_name'])) {
$devConstraintName[$devConstraintArrayAssoc[$i]['constraint_name']]['constraint_name'] = $devConstraintArrayAssoc[$i]['constraint_name'];
}
if (isset($devConstraintArrayAssoc[$i]['constraint_type'])) {
$devConstraintName[$devConstraintArrayAssoc[$i]['constraint_name']]['constraint_type'] = $devConstraintArrayAssoc[$i]['constraint_type'];
}
if (isset($devConstraintArrayAssoc[$i]['column_name'])) {
$devConstraintName[$devConstraintArrayAssoc[$i]['constraint_name']]['column_name'][] = $devConstraintArrayAssoc[$i]['column_name'];
}
if (isset($devConstraintArrayAssoc[$i]['match_option'])) {
$devConstraintName[$devConstraintArrayAssoc[$i]['constraint_name']]['match_option'] = $devConstraintArrayAssoc[$i]['match_option'];
}
if (isset($devConstraintArrayAssoc[$i]['update_rule'])) {
$devConstraintName[$devConstraintArrayAssoc[$i]['constraint_name']]['update_rule'] = $devConstraintArrayAssoc[$i]['update_rule'];
示例3:
}
if (isset($devColunaArrayAssoc[$i]['character_maximum_length'])) {
$devColunaName[$devColunaArrayAssoc[$i]['column_name']]['character_maximum_length'] = $devColunaArrayAssoc[$i]['character_maximum_length'];
}
if (isset($devColunaArrayAssoc[$i]['numeric_precision'])) {
$devColunaName[$devColunaArrayAssoc[$i]['column_name']]['numeric_precision'] = $devColunaArrayAssoc[$i]['numeric_precision'];
}
if (isset($devColunaArrayAssoc[$i]['numeric_scale'])) {
$devColunaName[$devColunaArrayAssoc[$i]['column_name']]['numeric_scale'] = $devColunaArrayAssoc[$i]['numeric_scale'];
}
if (isset($devColunaArrayAssoc[$i]['udt_name'])) {
$devColunaName[$devColunaArrayAssoc[$i]['column_name']]['udt_name'] = $devColunaArrayAssoc[$i]['udt_name'];
}
}
$devColuna = $devColunaName;
$devColunaArrayAssoc = $homolog->queryAllAssoc($colunaQuery . "'tabela3'");
for ($i = 0; $i < count($devColunaArrayAssoc); $i++) {
if (isset($devColunaArrayAssoc[$i]['column_name'])) {
$devColunaName[$devColunaArrayAssoc[$i]['column_name']]['column_name'] = $devColunaArrayAssoc[$i]['column_name'];
}
if (isset($devColunaArrayAssoc[$i]['column_default'])) {
$devColunaName[$devColunaArrayAssoc[$i]['column_name']]['column_default'] = $devColunaArrayAssoc[$i]['column_default'];
}
if (isset($devColunaArrayAssoc[$i]['is_nullable'])) {
$devColunaName[$devColunaArrayAssoc[$i]['column_name']]['is_nullable'] = $devColunaArrayAssoc[$i]['is_nullable'];
}
if (isset($devColunaArrayAssoc[$i]['data_type'])) {
$devColunaName[$devColunaArrayAssoc[$i]['column_name']]['data_type'] = $devColunaArrayAssoc[$i]['data_type'];
}
if (isset($devColunaArrayAssoc[$i]['character_maximum_length'])) {
$devColunaName[$devColunaArrayAssoc[$i]['column_name']]['character_maximum_length'] = $devColunaArrayAssoc[$i]['character_maximum_length'];