This topic is locked

Problem with quote for phpr 5.2 build 4348

1/22/2010 4:40:49 PM
PHPRunner General questions
A
acpan author

(Sorry this is for PHPRUNNER not ASPRunner, please help to move there, thanks.)

Steps to simulate:

  1. in Query Page of the phpr, first i have an extra SQL field which is Ops Login

    containing a double quoted text string "Go" as follows:
    SELECT

    card_value,

    password_ro,

    z_client_folder,

    "Go" AS Ops Login

    FROM resellers1

    ORDER BY id DESC
    Note: The above double quoted "Go" should be the root of the problem.
  2. In Visual Editor, click the Ops Login field and enter customer code:
    $v_http_path = "http://".$data["z_client_folder";];

    $value = "<a href='".$v_http_path."/login.php' target = '_blank'><font color = 'red'>Go!<font></a>";
    Note: This should not be the root of the problem.
  3. Generate the code.
  4. Open the generated page with a internet browser.
  5. Error display:
    Parse error: parse error, expecting `')'' in ..\..\include\resellers1_settings.php on line 1336
  6. Edit the file resellers1_settings.php and locate the line similar to below as follows:
    $proto1090["m_expr"]=$obj;

    $proto1090["m_alias"] = "Ops Login";

    $obj = new SQLFieldListItem($proto1090);

    $proto1045["m_fieldlist"][]=$obj;

    $proto1092=array();

    $obj = new SQLNonParsed(array(

    "m_sql" => ""Go""
  7. Notice ""Go""
  8. To fix it, replace all ""Go"" to "Go" in the above.
    i think it's the SQL Query, "Go" that causes the problem.

    Seem that 5.2 does not handle the SQL Query String:

    "Go" AS Ops Login
    Please check the bug above, it worked in 5.1.