Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP Forum > เว็บเป็นอะไรไม่รู้ครับ อยู่ดีๆก็เป็น ช่วยดูหน่อยนะครับ



 

เว็บเป็นอะไรไม่รู้ครับ อยู่ดีๆก็เป็น ช่วยดูหน่อยนะครับ

 



Topic : 099176



โพสกระทู้ ( 471 )
บทความ ( 0 )



สถานะออฟไลน์




หน้าเว็บทุกหน้าแสดงอย่างนี้หมดเลยครับ




A Mysql error has occurred while running the script:

The query you are trying to run is invalid



Tag : PHP, MySQL







Move To Hilight (Stock) 
Send To Friend.Bookmark.
Date : 2013-08-16 12:04:32 By : peap View : 757 Reply : 5
 

 

No. 1

Guest


server ล่มหรือป่าว






แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-08-16 12:27:18 By : next
 


 

No. 2



โพสกระทู้ ( 64 )
บทความ ( 0 )



สถานะออฟไลน์


service mysqld restart หน้าจะหายนะคะ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-08-16 13:49:14 By : MinKs
 

 

No. 3



โพสกระทู้ ( 471 )
บทความ ( 0 )



สถานะออฟไลน์


ใช้ hosting shared ของ hostgators น่ะครับ สาเหตุเกิดจากอะไรหรอครับ ยังไม่หายเลยครับ
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-08-16 13:53:44 By : peap
 


 

No. 4



โพสกระทู้ ( 74,058 )
บทความ ( 838 )

สมาชิกที่ใส่เสื้อไทยครีเอท

สถานะออฟไลน์
Twitter Facebook


แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-08-16 13:54:06 By : mr.win
 


 

No. 5



โพสกระทู้ ( 471 )
บทความ ( 0 )



สถานะออฟไลน์


ติดต่อ hostgators แล้ว เค้าบอกว่าสาเหตุมาจากโค๊ดของผม ไม่ได้เกี่ยวกับเค้า แต่ผมว่าเกี่ยวกับเค้าน่ะ เพราะผมยังไม่ได้แก้โค๊ดอะไรเลย


แต่เค้าบอกว่าไฟล์นี้น่าจะมีปัญหา

ช่วยดูให้หน่อยนะครับว่าปัญหาอยู่ส่วนไหนครับ

Code (PHP)
<?
#################################################################
## 															##
##-------------------------------------------------------------##
## Copyright �2007 PHP Pro Software LTD. All rights reserved.	##
##-------------------------------------------------------------##
#################################################################

$fileExtension = (file_exists('includes/global.php')) ? '' : '../';

include_once ($fileExtension.'includes/config.php');


define('INCLUDED', 1);

define('DEFAULT_DB_LANGUAGE', 'english');

function getmicrotime()
{
   list($usec, $sec) = explode(" ", microtime());
   return ((float)$usec + (float)$sec);
}

if(!function_exists('memory_get_usage'))
{
	function memory_get_usage()
	{
		if ( substr(PHP_OS,0,3) == 'WIN')
		{
			$output = array();
			exec( 'tasklist /FI "PID eq ' . getmypid() . '" /FO LIST', $output );

			return preg_replace( '/[\D]/', '', $output[5] ) * 1024;
		}
		else
		{
			//We now assume the OS is UNIX
			$pid = getmypid();
			exec("ps -eo%mem,rss,pid | grep $pid", $output);
			$output = explode("  ", $output[0]);
			//rss is given in 1024 byte units
			return $output[1] * 1024;
		}
	}
}

$time_start = getmicrotime();
##$memory_start = memory_get_usage();

include_once ($fileExtension.'language/'.DEFAULT_DB_LANGUAGE.'/db.lang.php');

include_once ($fileExtension.'includes/class_database.php');

$db = new database;

$db->connect($db_host, $db_username, $db_password);
$db->select_db($db_name);
$db->display_errors = true;
include_once ($fileExtension.'includes/class_session.php'); ## global
## create the session class, will contain all session variables.
$session = new session;

include_once ($fileExtension.'includes/init.php'); ## global
$current_version = '6.05';

include_once ($fileExtension.'includes/functions_security.php');

cleanData();

/**
 * sanitize order_type and order_field variables
 */
$_REQUEST['order_type'] = (in_array($_REQUEST['order_type'], array('ASC', 'DESC'))) ? $_REQUEST['order_type'] : 'DESC';


if (!empty($_REQUEST['order_field']))
{
	$order_field_explode = explode(' ', $_REQUEST['order_field']);
	
	if (count($order_field_explode) > 1)
	{
		die('Fatal Error: Query Prohibited');
	}	
}

include_once ($fileExtension.'includes/functions.php'); ## global

@include_once ($fileExtension.'includes/functions_integration.php'); ## PPB & PPA Integration

## now do the theme alterations in case of categories and auction_details
$is_custom_skin = 0;
if (eregi('categories.php', $_SERVER['PHP_SELF']))
{
	$category_id = $db->main_category(intval($_GET['parent_id']));

	$is_custom_skin = 1;
}
else if (eregi('auction_details.php', $_SERVER['PHP_SELF']))
{
	$category_id = $db->get_sql_field("SELECT category_id FROM " . DB_PREFIX . "auctions WHERE 
		auction_id='" . intval($_GET['auction_id']) . "'", 'category_id');
	
	$category_id = $db->main_category($category_id);
	
	$is_custom_skin = 1;
}

if ($is_custom_skin) 
{
	$custom_skin = $db->get_sql_field("SELECT custom_skin FROM " . DB_PREFIX . "categories WHERE 
		category_id='" . $category_id . "'", 'custom_skin');
	
	if (!empty($custom_skin))
	{
		$setts['default_theme'] = $custom_skin;
		define ('DEFAULT_THEME', $custom_skin);
	}
}

unlink_pin();

include_once ($fileExtension.'includes/class_template.php');

## initialize the template for the output that will be generated
$template = new template('templates/');

$template->set('setts', $setts);
$template->set('layout', $layout);
$template->set('current_version', $current_version);
$template->set('is_seller', $session->value('is_seller'));

(string) $template_output = NULL;

if ($setts['maintenance_mode'] && $session->value('adminarea')!='Active' && IN_ADMIN != 1)
{
	$template_output = $template->process('maintenance_splash_page.tpl.php');

	echo $template_output;
	die();
}

include_once ($fileExtension.'includes/class_voucher.php');
include_once ($fileExtension.'includes/class_fees_main.php');
include_once ($fileExtension.'includes/class_tax.php');

$fees = new fees_main();
$fees->setts = &$setts;
$template->set('fees', $fees);

$template->set('db', $db);

include_once ($fileExtension.'includes/class_banner.php');

## classes used in most files will be initialized here.

include_once ($fileExtension.'includes/functions_date.php');

## declare all the pages that can contain custom fields
$custom_fields_pages = array ('register', 'reputation_sale', 'reputation_purchase', 'auction', 'wanted_ad');

## custom section pages
$custom_section_pages = array ('help', 'news', 'faq', 'custom_page', 'announcements');
$custom_section_pages_ordering = array('help', 'faq', 'custom_page');

$custom_pages = array('about_us', 'contact_us', 'terms', 'privacy');

## declare all tables that are linkable to custom fields
$linkable_tables = array('countries');

## load the cron if it is run from the site.
if ($setts['cron_job_type'] == 2 && IN_ADMIN != 1)
{
	$manual_cron = true;
	include_once ($fileExtension . 'cron_jobs/main_cron.php');
}

$auction_ordering = array('a.name', 'a.start_price', 'a.max_bid', 'a.nb_bids', 'a.end_time');
$order_types = array('DESC', 'ASC');
## suspend user accounts that are over the debit limit. -> placeholder

### IP Logging addon, created by Kevin

if ($session->value('user_id') > 0) 
{
	$set = 0;
	
	$db->query("CREATE TABLE IF NOT EXISTS " . DB_PREFIX . "iphistory (
		`memberid` INT NOT NULL, 
		`time1` INT NOT NULL, 
		`time2` INT NOT NULL, 
		`ip` VARCHAR(20) NOT NULL
	)");
	
	$sql_select_iphistory = $db->query("SELECT time1, time2, ip FROM " . DB_PREFIX . "iphistory WHERE 
		memberid='" . $session->value('user_id') . "' ORDER by time1 DESC LIMIT 1");
	
	if ($db->num_rows($sql_select_iphistory) > 0) 
	{
		if ($ip_details = $db->fetch_array($sql_select_iphistory)) 
		{
			if ($ip_details['ip'] == $_SERVER['REMOTE_ADDR']) 
			{
				$db->query("UPDATE " . DB_PREFIX . "iphistory SET time2='" . CURRENT_TIME . "' WHERE 
					time1='" . $ip_details['time1'] . "' AND ip='" . $ip_details['ip'] . "'");

				$set = 1;
			}
		}
	}
	
	if (!$set) 
	{
		$db->query("INSERT INTO " . DB_PREFIX . "iphistory VALUES 
			('" . $session->value('user_id') . "', '" . CURRENT_TIME . "', '0', '" . $_SERVER['REMOTE_ADDR'] . "')");
	}
}

include_once ($fileExtension.'includes/class_shop.php');
include_once ($fileExtension.'includes/functions_addons.php');

?>



ประวัติการแก้ไข
2013-08-16 14:46:33
แสดงความคิดเห็นโดยอ้างถึง ความคิดเห็นนี้
Date : 2013-08-16 14:36:29 By : peap
 

   

ค้นหาข้อมูล


   
 

แสดงความคิดเห็น
Re : เว็บเป็นอะไรไม่รู้ครับ อยู่ดีๆก็เป็น ช่วยดูหน่อยนะครับ
 
 
รายละเอียด
 
ตัวหนา ตัวเอียง ตัวขีดเส้นใต้ ตัวมีขีดกลาง| ตัวเรืองแสง ตัวมีเงา ตัวอักษรวิ่ง| จัดย่อหน้าอิสระ จัดย่อหน้าชิดซ้าย จัดย่อหน้ากึ่งกลาง จัดย่อหน้าชิดขวา| เส้นขวาง| ขนาดตัวอักษร แบบตัวอักษร
ใส่แฟลช ใส่รูป ใส่ไฮเปอร์ลิ้งค์ ใส่อีเมล์ ใส่ลิ้งค์ FTP| ใส่แถวของตาราง ใส่คอลัมน์ตาราง| ตัวยก ตัวห้อย ตัวพิมพ์ดีด| ใส่โค้ด ใส่การอ้างถึงคำพูด| ใส่ลีสต์
smiley for :lol: smiley for :ken: smiley for :D smiley for :) smiley for ;) smiley for :eek: smiley for :geek: smiley for :roll: smiley for :erm: smiley for :cool: smiley for :blank: smiley for :idea: smiley for :ehh: smiley for :aargh: smiley for :evil:
Insert PHP Code
Insert ASP Code
Insert VB.NET Code Insert C#.NET Code Insert JavaScript Code Insert C#.NET Code
Insert Java Code
Insert Android Code
Insert Objective-C Code
Insert XML Code
Insert SQL Code
Insert Code
เพื่อความเรียบร้อยของข้อความ ควรจัดรูปแบบให้พอดีกับขนาดของหน้าจอ เพื่อง่ายต่อการอ่านและสบายตา และตรวจสอบภาษาไทยให้ถูกต้อง

อัพโหลดแทรกรูปภาพ

Notice

เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ
อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง

   
  เพื่อความปลอดภัยและการตรวจสอบ กระทู้ที่แทรกไฟล์อัพโหลดไฟล์จากที่อื่น อาจจะถูกลบทิ้ง
 
โดย
อีเมล์
บวกค่าให้ถูก
<= ตัวเลขฮินดูอารบิก เช่น 123 (หรือล็อกอินเข้าระบบสมาชิกเพื่อไม่ต้องกรอก)







Exchange: นำเข้าสินค้าจากจีน, Taobao, เฟอร์นิเจอร์, ของพรีเมี่ยม, ร่ม, ปากกา, power bank, แฟลชไดร์ฟ, กระบอกน้ำ

Load balance : Server 01
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่