You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2011-04-15 21:43:38

abdora
Member
Registered: 2011-03-21
Posts: 16

About a global $DB

Where the global $DB is defined?!

Offline

#2 2011-04-20 14:32:41

abdora
Member
Registered: 2011-03-21
Posts: 16

Re: About a global $DB

anyone?! I don't understand how it works. If I have an arquive dataToSend.form.php:

<?php
define('GLPI_ROOT', '../../..');
include (GLPI_ROOT . "/inc/includes.php");


funtion searchData() {
global $DB;

$select = "Select * FROM glpi_tickets";
$result = $DB->query($query);
if ($DB->numrows($result) > 0) {
           while ($line = $DB->fetch_assoc($result)) {
             echo $line["key"];
        }
}

}
?>

This is correct? Because when I do it dont it works?

Offline

Board footer

Powered by FluxBB