Files
crm.clientright.ru/find_moo_field.php

35 lines
1.0 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
require_once('config.php');
global $adb;
$project_id = 393669;
// Получаем все поля проекта
$query = "SELECT * FROM vtiger_project WHERE projectid = ?";
$result = $adb->pquery($query, array($project_id));
if ($adb->num_rows($result) > 0) {
echo "Project $project_id data:\n";
$row = $adb->fetch_array($result);
// Выводим все поля, которые содержат "МОО" или "КЛИЕНТПРАВ"
foreach ($row as $field => $value) {
if (stripos($value, 'МОО') !== false || stripos($value, 'КЛИЕНТПРАВ') !== false) {
echo "*** $field: $value ***\n";
}
}
// Также выведем все непустые поля
echo "\nAll non-empty fields:\n";
foreach ($row as $field => $value) {
if (!empty($value) && $value !== '0' && $value !== '0000-00-00' && $value !== '0000-00-00 00:00:00') {
echo "$field: $value\n";
}
}
} else {
echo "Project $project_id not found\n";
}
?>