Jump to content

sarathwhr

Members
  • Posts

    4
  • Joined

  • Last visited

sarathwhr's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I tried replacing $res = mysql_query($sql, $this->_getConnection($type)); with $res = mysql_query($sql, $this->_getConnection($type)) or die('Error:' . mysql_error()); But, same result I am not sure if that is what you asked me to try.
  2. Hello, Thanks for your reply. My code is : ==== // collect fields $sql = "SHOW FULL COLUMNS FROM `{$tableName}`"; $res = mysql_query($sql, $this->_getConnection($type)); while($row = mysql_fetch_row($res)) { $tableProp['fields'][$row[0]] = array( 'type' => $row[1], 'is_null' => strtoupper($row[3]) == 'YES' ? true : false, 'default' => $row[5], 'extra' => $row[6], 'collation' => $row[2], ); } // create sql $sql = "SHOW CREATE TABLE `{$tableName}`"; $res = mysql_query($sql, $this->_getConnection($type)); $row = mysql_fetch_row($res); $tableProp['create_sql'] = $row[1]; ==== Can you tell me where exactly modification is needed? Replace $res = mysql_query($sql, $this->_getConnection($type)); with $res = mysql_query($query) or die('Error:' . mysql_error()) ?
  3. Hello, I am getting the following error: ==== Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in /home/user/public_html/magento-db-repair-tool-1.1.php on line 378 Warning: mysql_fetch_row() expects parameter 1 to be resource, boolean given in /home/user/public_html/magento-db-repair-tool-1.1.php on line 391 ==== I believe it is something with the code since I haven’t touched that file. A quick googling also lead me to the same conclusion. Please help. Pasting lines below (from 378 to 391) : ==== while($row = mysql_fetch_row($res)) { $tableProp[’fields’][$row[0]] = array( ‘type’ => $row[1], ‘is_null’ => strtoupper($row[3]) == ‘YES’ ? true : false, ‘default’ => $row[5], ‘extra’ => $row[6], ‘collation’ => $row[2], ); } // create sql $sql = “SHOW CREATE TABLE `{$tableName}`”; $res = mysql_query($sql, $this->_getConnection($type)); $row = mysql_fetch_row($res); ====
×
×
  • 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.