Jump to content

Query's crash in Internet Explorer


Thomisback

Recommended Posts

Hi,

 

Some of my mysql queries crash in Internet Explorer while in Firefox they work fine!

For example:

$planetrow = doquery("SELECT * FROM {{table}} WHERE id={$user['current_planet']}",'planets',true);

Works in Firefox but crashes in Internet explorer.

 

The "doquery" function:

function doquery($query, $table, $fetch = false){
  global $link,$debug,$ugamela_root_path;

@include($ugamela_root_path.'config.php');

if(!$link)
{
	$link = odbc_connect($dbsettings["server"], $dbsettings["user"], 
			$dbsettings["pass"]) or
			$debug->error(odbc_error()."<br />$query","SQL Error");
			//message(mysql_error()."<br />$query","SQL Error");

	odbc_select_db($dbsettings["name"]) or $debug->error(odbc_error()."<br />$query","SQL Error");
}
// por el momento $query se mostrara
// pero luego solo se vera en modo debug
$sqlquery = odbc_exec($query, str_replace("{{table}}", $dbsettings["prefix"].
			$table)) or 
			$debug->error(odbc_error()."<br />$query","SQL Error");
			//message(mysql_error()."<br />$query","SQL Error");

unset($dbsettings);

global $numqueries,$debug;//,$depurerwrote003;
$numqueries++;
//$depurerwrote003 .= ;
$debug->add("<tr><th>Query $numqueries: </th><th>$query</th><th>$table</th><th>$fetch</th></tr>");

if($fetch)
{ //hace el fetch y regresa $sqlrow
	$sqlrow = odbc_fetch_array($sqlquery);
	return $sqlrow;
}else{ //devuelve el $sqlquery ("sin fetch")
	return $sqlquery;
}

}

 

config.php:

<?php
if(!defined("INSIDE")){ die("attemp hacking");}
$dbsettings = Array(
	"server"        => "localhost"
	"user"          => "",
	"pass"          => "",
	"name"          => "",
	"prefix"        => "ugml_",
	"secretword"    => "secret");

$api_key = 'ad5fdcd2a31e8863e7c83a8c04aa6f4d';
$secret  = 'b04d7ead5b37d1da2710fc8d66ea8311';

// The IP address of your database
$db_ip = 'localhost';           

$db_user = '';
$db_pass = '';


$db_name = '';
?>

 

I have been looking for an answer for a while now but I really can't solve it, someone please help me.

 

Kind regards.

Link to comment
Share on other sites

This is driving me crazy, I just checked my error log and the only thing it says after I loaded the page is:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' at line 1
SELECT * FROM ugml_errors WHERE id=

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.