Questions tagged as 'php'

1
answer

How to work with the IN statement in PHP + PDO? [duplicate]

I'm trying to build a dynamic SQL but I'm getting caught by not understanding how to work with the IN statement in the PDO Example: $SQL = "select * from tabela where (campo in(:valor))"; $Query = Database::Prepare($SQL); $Query->bindValu...
asked by 18.08.2017 / 22:20
1
answer

How to redirect a page using .htaccess?

How have you been? Well, I've been dealing with a problem that is summarized in the following: I want through the .htaccess file to redirect just the home page from my site to another domain. Example: Redirect: www.site1.com - > www...
asked by 11.12.2018 / 23:25
1
answer

What exactly does the DateTime :: createFromImmutable () method serve?

What exactly is the DateTime::createFromImmutable() method for? Implemented according to release note of PHP version 7.3.0.     
asked by 21.12.2018 / 02:36
2
answers

Access the instance of the main class from an anonymous one in PHP 7

I'm trying to access the instance of the class where it contains an anonymous one as we do in Java, for example: JAVA class MyClass { private String prop = "test"; public void test() { new Runnable() { pub...
asked by 11.07.2017 / 18:35
1
answer

Run minimized or hidden PHP script by Task Scheduler

I have a task scheduled on windows running perfectly ), where it runs a PHP script: Scheduler : email.php:<?phprequire_once'classes/core.class.php';set_time_limit(120);$tempo1=microtime(true);$core=newEmail();$core->enviaEmails()...
asked by 12.07.2018 / 14:46
1
answer

Simultaneous connection to PDO direct banks

I need to make an appointment using 2 different banks simultaneously. One is mysql and another firebird . It is already working separately, I would like to make the connection without having to close one to open the other. Examp...
asked by 25.04.2017 / 19:31
1
answer

Which hash algorithms are already built into PHP?

Recently I've been looking for hash algorithms that were not the known md5 , sha1 and sha2 , and that have generated hashs smaller than those mentioned. That's where I caught myself thinking, how do I know which hash algori...
asked by 22.09.2014 / 15:20
1
answer

Display the year and month that is coming from the array

I can already display the year within the foreach by the position, how do I display the month too? The array is coming like this, the month in case would be that 3, 2, 3, 4 wanted to display this value inside my foreach (this is the var_dump...
asked by 05.04.2017 / 19:46
1
answer

mobile operator consultation

I started a query to find out which cell phone carrier is pulling from a website. However, I can only do one at a time. I would like help so I could paste a list and it would be sending in requisitions and printing the separate result. <?ph...
asked by 31.03.2017 / 14:02
1
answer

findBy Doctrine

I would like to ask a question, I am using the command to make a filter: $FinContaspagar = $em->getRepository(FinContaspagar::class)->findBy(array('grupo' => '0')); However, I would like the condition inside the array to be group...
asked by 11.04.2017 / 22:27