At first I already examined this , this and this .
I got the following error:
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 220 bytes)
I work with php 5.4and sql Anywhere 11.
php 5.4
sql Anywhere 11
Resolving this in accordance with
Hope someone can help me.
Solution : I found a solution: I added WHERE (columnName1 = columnName2), divided the result, and it works again, relatively quickly!
WHERE (columnName1 = columnName2)
<?php $connect = sasql_connect("UID=username;PWD=pass"); if (isset($_GET["page"])) { $page = $_GET["page"]; } else { $page=1; }; $results_page = 100; $start_from = ($page-1) * $results_page + 1; $result = sasql_query($connect, "SELECT TOP $results_page START AT $start * FROM table1, table2 WHERE (columnName1 = columnName2)"); if(!$result){ echo "sasql_query failed"; return 0; } else { echo "query completed successfully\n"; sasql_result_all($result); } sasql_close($conn); ?>
Of course I add to my php-pagea <a href="<?php echo $page -1; ?>">Previous</a>and<a href="<?php echo $page + 1; ?>">Next</a>
php-page
<a href="<?php echo $page -1; ?>">Previous</a>
<a href="<?php echo $page + 1; ?>">Next</a>
Thank you all for your help!
You have to use
ini_set("memory_limit",-1);
"memory_set". , : fooobar.com/questions/142278/... ( Suhosin ).
script , . , , - SQL-.
, . , , LIMIT ... OFFSET SQL.
LIMIT ... OFFSET
, php-pecl-apc , php config memory_limit 48 , .
Source: https://habr.com/ru/post/1502974/More articles:Changing the MFC Dialog from STA to MTA? - c ++how to get max width for div using jquery - javascriptoperation status and exceptions - phpHow can we sync sqlite (local) database with mysql (server) database in iOS? - phpShould the Square class publicly inherit from the Rectangle class? - c ++Create a list in an Android application - androidUsing personal SSL certificates using Webdriver (Selenium 2.0) - javaPassing some LINQ query into function argument? - c #Count the various lines in C # code - stringHow to create a DateTime object? - c #All Articles