got that now, next prob=
Warning: mysql_connect(): Client does not support authentication protocol requested by server; consider upgrading MySQL client in /var/www/html/global.php on line 47
Invalid Query: SELECT * FROM items WHERE item_page=1 AND item_publish=1 ORDER BY item_date desc,item_id desc
thoughts?
chz
could there be anything changed in the syntax of the php file to allow the query?
here's the **edited** version of the global.php file
<?php
$global=array(
'dir'=>array(
'tpl'=>'/***/***/***s*',
'resource'=>'/***/***/***/***',
'banners'=>'/***/***/***/***/***',
),
'url'=>array(
'resource'=>'/***',
'banners'=>'/****/***',
),
'types'=>array(
'pdf'=>'pdf',
'doc'=>'doc',
'jpg'=>'img',
'JPG'=>'img',
'gif'=>'img',
'jpe'=>'img',
'jpeg'=>'img',
'png'=>'img',
'mov'=>'mov',
'mp3'=>'mp3',
'wma'=>'wma'
),
'admin'=>array(
'username'=>'***',
'password'=>'***',
'email'=>'***@***.com'
),
'meta'=>array(
'keywords'=>'***, ***, ***, ***, ***,***,***, ***, ***',
'description'=>'**********'
),
'default_page_id'=>array(
'index'=>1,
'contact'=>2
)
);
$db_connect=0;
#error_reporting(E_ERROR);
function _db_connect() {
global $db_connect;
if (!$db_connect) {
mysql_connect('l**','**','**');
mysql_select_db('**');
$db_connect=1;
}
return;
}
function db_query($sql){
_db_connect();
$rows=array();
$result=mysql_query($sql) or die('Invalid Query: '.$sql);
return $result;
}
function db_insert($sql){
_db_connect();
$rows=array();
$result=mysql_query($sql) or die('Invalid Query: '.$sql);
return mysql_insert_id();
}
function db_select_array($sql){
_db_connect();
$rows=array();
$result=mysql_query($sql) or die('Invalid Query: '.$sql);
while ($row=mysql_fetch_array($result)){
array_push($rows,$row);
Last edited by mushka : 09-Nov-2004 05:14 PM.
|