Jump to content


Photo

Parse error


  • Please log in to reply
1 reply to this topic

#1 jakKersS

jakKersS
  • New Members
  • Pip
  • Newbie
  • 2 posts

Posted 22 October 2006 - 10:44 AM

My index.php doesnt show anything at all but the installer.php shows:

Parse error: syntax error, unexpected '.', expecting ')' in /home/www/mysql.php on line 10

Mysql.php code:

<?php


class mysql {

var $link;
var $querycount=0;
var $querylist='';

function connect($evolution.awardspace.com:38371, $crazygamez_wtf, $I PUT MY PASS HERE, $crazygamez_wtf) {
$this->link = mysql_connect($host, $username, $password) or die("Could not connect.");
mysql_select_db($db) or die("Could not find database.");
}

function query($query) {
if (!($result = mysql_query($query))) {
ob_end_clean();
die("SQL Error: ".mysql_error()."<br />Query: $query<br />");
}

$this->querycount++;
$this->querylist.="<br />$query";
return $result;
}

function result($result, $row, $name) {
return mysql_result($result, $row, $name);
}

function numrows($result) {
$numrows = mysql_num_rows($result);
return $numrows;
}

function affectedrows() {
return mysql_affected_rows($this->link);
}


}

?>


#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 22 October 2006 - 08:39 PM

You haven't properly quoted the first parameter to mysql_connect.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users