Показать сообщение отдельно
Старый 08.12.2003, 23:32
Reacol вне форума Посмотреть профиль Отправить личное сообщение для Reacol Найти все сообщения от Reacol
  № 1  
Reacol
 
Аватар для Reacol

Регистрация: Jul 2003
Сообщений: 55
По умолчанию Чего-то не догоняю...

Привет, пытаюсь чтобы флэш получал текст, через loadVariablesNum ("test.php", 0); но ничего не получается, что я делаю неправильно?

файл test.php
<?php
require('../common/db.php');
$db = new DB();
$db->query("select id, text, from newsofday order by date desc");
echo "text=всем привет".$db."";
$db->close();
?>

файл ../common/db.php
<?php
if (!class_exists('DB'))
{
class DB
{
var $db;
var $res;
function DB()
{
$this->db = mysql_connect('......', '.......', '.......') or die ("Cannot connect to DB");
mysql_select_db('........', $this->db);
}

function close()
{
mysql_close($this->db);
}

function query($query)
{
$this->res = mysql_query($query) or die ("Error in QUERY: $query");
}

function num_rows()
{
return mysql_num_rows($this->res);
}

function get_row($i)
{
return mysql_fetch_row($this->res);
}

function last_insert_id()
{
return mysql_insert_id();
}
}
}

?>
__________________
Главное не результат, а процесс!