Skip to content
Advertisement

Tag: php

i have a problem with search using php, mysql

I have 50M data in my database (mysql phpmyadmin), when I search inside this data using php it takes a lot of time, very slow How can i solve this problem? my code : and thanks I’ve already tried using limit and Like But nothing happened Answer There are three things I can suggest you that can improve the performance

ORM model for foreign database in typo3

I am writing a typo3 plugin that needs to access a database table of a pre-defined structure on a configurable MySQL / MariaDB database server. This is the model I wrote: Of course this does not work as it stands, since Typo3 assumes the model to represent a table as defined by ext_tables.{php,sql} within the local typo3 database. But I

Exception ‘no active transaction’ when using ORMExecutor::execute

I upgraded a legacy project from: PHP 5.6 -> 8.0 doctrine/orm 2.5.14 -> 2.13.4 doctrine/data-fixtures 1.2.2 -> 1.5.3 Now the following code throws the exception: PDOException : There is no active transaction /var/www/html/src/vendor/doctrine/dbal/src/Driver/PDO/Connection.php:120 /var/www/html/src/vendor/doctrine/dbal/src/Connection.php:1481 /var/www/html/src/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:280 The exception is thrown when DoctrineORMEntityManager::transactional calls: $this->conn->commit() In the documentation I read: Not all RDBMS have the capability to allow TRUNCATE statements inside transactions

How to create PHP SplStack from array

I’m wondering if there is an easy way to create SplStack from an array. Sure I can write a simple function that will do that: However, I don’t like this approach, because I have to iterate over the array and push items one by one. Is there a way to create a stack directly from the array? Answer The documentation

How to refresh changes in swoole PHP

I created one folder with two files, one is index.php and one is Dockerfile and in terminal I run php index.php and it started on http://127.0.0.1:9501/, but when I change hello world in something else, it doesn’t show new change on that link.. it stays hello world. I am trying to learn Swoole and I don’t know how to work

Advertisement