Questions tagged as 'php'

3
answers

Foreach returning unconverted array

I'm using this little code to pick up words with a minimum of 2 characters, but it returns me:    Notice: Array to string conversion in echo $ word; preg_match_all("/[a-z0-9\-]{2,}/i", "oi voce tem problema pra entender isso?", $output_arr...
asked by 14.01.2015 / 00:05
3
answers

Multiple connections with the Bank

In a PHP system that communicates with BD (MySQL) to retrieve the information and return it to the user who accesses it, is it necessary to establish multiple connections with the Bank? Or just one?     
asked by 20.12.2014 / 19:04
1
answer

What size of a large considerable query?

What size of a large query ? I need to make a function to send query to the server but I can not exceed the limit to not crash the server: public function sqlExecute($sql_code) { if ($sql_code != "" && strlen($sql_code) &...
asked by 05.04.2015 / 01:37
3
answers

Generate sequential number within one month

How to generate sequential numbers consisting of year, month, 5-digit sequence. with the digits reset when changing the month? Example: 14 // ANO 11 // MÊS 00000 // SEQUÊNCIA QUE AO MUDAR O MÊS ZERA Getting: 141100000 .. 141100...
asked by 17.11.2014 / 16:57
2
answers

What is and what is php.ini for?

It may even be a simple question but I wonder what is the php.ini and its use for a site / system. If possible, I would like good references (not always the meeting) that can help in the explanation as well.     
asked by 19.11.2015 / 14:28
2
answers

how do I return two times using the COUNT (*) function

SELECT COUNT(*) AS contador, hora_efetivada FROM minha_tabela WHERE status=2 I have a counter that returns the total value of status 2 in the database, but in my column named hora_efetivada there are several times. How do I make...
asked by 26.11.2015 / 19:43
3
answers

PHP bank text for html

I'm having trouble returning text with HTML formatting for the view . I need to return it with broken lines. I also tried to put it without the HTML tags in the database and then I used the nl2br() function that transforms /n int...
asked by 10.12.2015 / 13:45
2
answers

Regular expression for number

I have some strings as follows: 99-01[10-10-2010] 59-06[11-12-2016] So long so good. What I need, is via PHP and regular expression, replace any character before that first hiffen (-), for some text, only the first. Staying for example...
asked by 06.05.2016 / 00:04
2
answers

How to limit log display to 30 days from today's date

I'd like to be able to limit the display of news that I've written to my banco de dados to 30 days from today's date, for example: Show registered news from 03/02/2016 to 02/01/2016 , I tried to use some solutions that I f...
asked by 03.02.2016 / 13:00
4
answers

How to delete COOKIES in PHP?

How can I delete COOKIES in PHP? I know that for sessions it has session_destroy() but for Cookies how do I do it?     
asked by 21.02.2016 / 19:22