Okay first the string I should finde was not mutch diferent then the one that I hade to replace.
My String in wowdb.php
- Code: Select all
$playerInfo = $data[$index];
$playerName = $playerInfo['name'];
$playerDate = date('Y-m-d G:i:s', strtotime($playerInfo['date']));
$playerRealm = $playerInfo['realm'];
// skip if entry already there
$querystr = "SELECT `guild` FROM `".ROSTER_PVP2TABLE."` WHERE `index` = '$index' AND `member_id` = '$memberId' AND `name` = '".$this->escape( $playerName )."' AND `date` = '".$this->escape( $playerDate )." AND `realm` = '".$this->escape( $playerRealm )."'";
And this one was the one that I should replace:
- Code: Select all
$playerInfo = $data[$index];
$playerName = $playerInfo['name'];
$playerDate = date('Y-m-d G:i:s', strtotime($playerInfo['date']));
$playerRealm = $playerInfo['realm'];
// skip if entry already there
$querystr = "SELECT `guild` FROM `".ROSTER_PVP2TABLE."` WHERE `index` = '$index' AND `member_id` = '$memberId' AND `name` = '".$this->escape( $playerName )."' AND `date` = '".$this->escape( $playerDate ).( !empty($playerRealm) ? " AND `realm` = '".$this->escape( $playerRealm )."'" : '' );
The only diferent in those 2 are som extra added in the query string.
Now I tryed to replace it with the one you posted and I still get the same error.
BUTI found the problem
in the query string, you have missed an single quote ( ' ) to close the data input info.
This string is from the original query string in my wowdb.php
Here is the problem:
- Code: Select all
AND `date` = '".$this->escape( $playerDate )." AND
and here is the fix:
- Code: Select all
AND `date` = '".$this->escape( $playerDate )."' AND
Notis the single quote that i have added right before the last AND statement.
In the new query you posted to replace with then problem is right here:
- Code: Select all
AND `date` = '".$this->escape( $playerDate ).( !empty($playerRealm) ? " AND `realm` = '".$this->escape( $playerRealm )."'" : '' );
and here is the fix:
- Code: Select all
AND `date` = '".$this->escape( $playerDate )."'".( !empty($playerRealm) ? " AND `realm` = '".$this->escape( $playerRealm )."'" : '' );
Notis the [
"'". ] i have placed.
Now after I did that there was no problem at all.
No error, no problem, only success
I have tryed both queryes (The original one that was in my wowdb.php and the one to replace with) and they both work.
Now the question is, witch one of the queryes should I use ??
Have fun
//Satis