Page 2 of 2

Posted: Fri Feb 25, 2005 3:28 pm
by thx967
smpdawg wrote:Actually it never occurred to me that you were changing the code at the top. Some people will not know that is what you did and may end up saying something about the code looking right because they don't know that you changed it but I know where you are coming from.

You may want to add that or die() to DbConnector.php so you can see the error message. You can always remove it when the code is stable.
How would I add that to my function query without rewriting the bulk of my code? I've tried adding it at the end of my current query - and it dies alright. none of my queries work with the revised statement.

Code: Select all

//*** Function: query, Purpose: Execute a database query ***
function query($query) {
	$this->theQuery = $query;
	return mysql_query($query, $this->link) or die(mysql_error());
}

Posted: Fri Feb 25, 2005 3:36 pm
by smpdawg
How about like this? Whether that works or not, what does the current $insertQuery look like? I am on IM (MSN, AIM and ICQ) right now - I can walk through the code with you on IM if you'd like.

Code: Select all

//*** Function: query, Purpose: Execute a database query ***
function query($query) {
   $this->theQuery = $query;
   return mysql_query($query, $this->link) or die(mysql_error($this->link));
}

PROBLEM SOLVED

Posted: Fri Feb 25, 2005 6:12 pm
by thx967
Thanks to smpdawg!!!

The problem was in my naming convention for one of the fields.

"desc"

It turn out that the name of the table field is restricted by mysql. changing the name to "desription" fixed my posting problem.