This topic is locked
[SOLVED]

 PHPR 6 Bug ?

9/4/2011 10:39:45 AM
PHPRunner General questions
A
acpan author

It works in phpr 5.3 and when upgrade to phpr 6.0b, it does not work anymore and

gives error: mysql_query() expects parameter 2 to be resource, object given
in the the events.php, i have the following lines:
$strSQL1 = "select distinct id from XX where id =".$_SESSION["id"];

$result = mysql_query($strSQL1,$conn) or die(mysql_error());

$row_count1 = mysql_num_rows($result);
if ($row_count1 == 0)

{

echo ">0"

}

ELSE

{

echo "<0";

}
To make it work, i have to change the codes to the following:
$link = mysql_connect("127.0.0.1", "abc", "abc1234");

mysql_select_db("customer", $link);

$result = mysql_query($strSQL1, $link) or die(mysql_error());

$row_count1 = mysql_num_rows($result);

if ($row_count1 == 0)

{

echo ">0";

}

ELSE

{

echo "<0";

}
Is there anything i missed? seems the $conn variable does not work like previously in phpr5.3,

then i have to replace all the original codes. Pls advise.

Sergey Kornilov admin 9/4/2011

I would ask you to post your application that doesn't work to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program. We'll investigate this and be back to you with a solution.

Sergey Kornilov admin 9/5/2011

PHPRunner 6 uses mysqli PHP extension when available. mysql_query() won't work, mysqli_query().
Better yet, use db_query (PHPRunner wrapper for mysql_query) or DAL. This way you will make your code compatible with future versions.

A
acpan author 9/8/2011



PHPRunner 6 uses mysqli PHP extension when available. mysql_query() won't work, mysqli_query().
Better yet, use db_query (PHPRunner wrapper for mysql_query) or DAL. This way you will make your code compatible with future versions.


Thanks, it fixed it.