Page 1 of 1

Try to use Reports....Endless troubleshooting ...

Posted: Fri Mar 25, 2011 6:22 am
by chopper64
I'm in the process ReportsFX the PHP version in my development to be integrated. I work with ScripCase. There, everything is managed in classes.
When I try gave the following problems:

1. Database connectivity
For the management of the access database to a class is used. Why?
Clear classes are fine, but everything is procedual why not here?

2. Separator
In the function {sti_parse_query_parameters be used as a delimiter for the parameters. These are also the same Blockbegrenzer in PHP. Due to the direct encoding of the {it is in the source code to an odd number of {. For some editors have determined so their problems ....
Better this way:

Code: Select all

function sti_parse_query_parameters  ($ query)
   {
    $ result = "";
    $ bracket_open ="{";
    $ bracket_close ="}";
    while (strpos ($ query, $ bracket_open!) == false)
    {
     $ result .= substr ($ query, 0, strpos ($ query, $ bracket_open));
     $ query = substr ($ query, strpos ($ query, $ bracket_open) + 1);
     $ parameter_name = substr ($ query, 0, strpos ($ query, $ bracket_close));
     $ parameter_value sti_get_parameter_value = ($ parameter_name);
     $ result .= ($ parameter_name, $ parameter_value) sti_get_parameter;
     $ query = substr ($ query, strpos ($ query, $ bracket_close) + 1);
    }
   
    return $ result $ query;.
   }

Try to use Reports....Endless troubleshooting ...

Posted: Sat Mar 26, 2011 1:53 am
by Vladimir
Hello,

1. PHP scripts is used only for connecting to the database and get the tables and data. Could you please describe in detail, what methods do you mean?

2. Thanks for this clarification, we will take it into consideration.

Thank you.

Try to use Reports....Endless troubleshooting ...

Posted: Tue Mar 29, 2011 2:58 am
by chopper64
To 1
in the functions for the database connection in a class is declared. It manages the data connection to the database.
Now, if the scripts inserted into a script, which itself declared a class, which results in an error message of the interpreter, because the declaration is not allowed in classes within classes.

Better here is a declaration that declares the traffic data as an array.

Maybe:

Code: Select all

MySQL:
$conn = ARRAY('SERVER' => $server,
                        'port'  => $port 
                        'db' => $databsename
                        'usr' => $usrname
                        'pwd' => $password);

Try to use Reports....Endless troubleshooting ...

Posted: Tue Mar 29, 2011 7:39 am
by Vladimir
Hello,

We have changed the function of connecting to databases, now they work using arrays.

Thank you.