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

Stimulsoft Reports.PHP discussion
Post Reply
chopper64
Posts: 26
Joined: Mon Dec 20, 2010 2:33 am
Location: Berlin

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

Post 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;.
   }
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

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

Post 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.
chopper64
Posts: 26
Joined: Mon Dec 20, 2010 2:33 am
Location: Berlin

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

Post 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);
Vladimir
Posts: 1462
Joined: Fri Apr 13, 2007 4:05 am
Location: Earth

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

Post by Vladimir »

Hello,

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

Thank you.
Post Reply