Questions tagged as 'mysql'

2
answers

exceeded the 'max_user_connections' resource

I'm not sure what the reason for the error I'm having is but it looks like it's something about the open connections in the database, where an error is occurring if the application tries to create more connections than the limit. I think this is...
asked by 03.02.2017 / 20:30
1
answer

error in sending data via ajax

I am not able to send the data to mysql via ajax, I do not know what part of my code could be wrong. My index on which categories are listed from the database via jquery. <div class="container"> <h1 class="restaurant-title...
asked by 02.02.2017 / 20:57
2
answers

Display only one record with the foreach

I need help to display a record of the database, following code: <?php $posts = DBRead( 'posts', "WHERE categoria = 3 AND status = 1 ORDER BY data_numero ASC" ); if( !$posts ) echo '<h2>Nenhuma Corrida Registrada!<...
asked by 15.01.2017 / 20:19
1
answer

Fatal error: Call a member function num_rows () on a non-object

I'm trying to get the total number of rows from a query but I'm giving this error, I already tried to use the row (), rowCount () function and even check if I found any results to return and even though I did not get the solution    Fatal err...
asked by 24.01.2017 / 22:59
1
answer

Simple Query MySQL [closed]

Have the query: SELECT * FROM cliente, categoria_cliente, categoria WHERE categoria_cliente_cliente_id = cliente_id and categoria_id = categoria_cliente_categoria_id and (categoria_cliente_categoria_id = 1 OR categoria...
asked by 26.01.2017 / 17:09
2
answers

Trimming html and css table layout

I have a page page in php that looks for mysql data and shows in a table: However,whenIlowerthewindow,thetablesandtheheaderare"disorganized," like this: HowdoI"lock" the tables and that they do not change position according to the size o...
asked by 11.10.2017 / 19:12
1
answer

Connection security with MySQL using PDO, am I doing it right?

Is it safe to connect to MySQL only using the following form below? <?php function conectar() { $server = "localhost"; $dbname = "banco"; $dbuser = "usuario"; $dbpass = "senha"; try {...
asked by 21.09.2017 / 14:01
2
answers

Create variables with database data?

I'd like to have a while of a query and go fetch the data and create 3 variables apart with this information. For example: $sel_exclui=mysql_query("SELECT * from tabela order by id DESC LIMIT 0,3"); I thought about using my...
asked by 22.09.2017 / 18:22
1
answer

How to get the last record to the first

I have these names in my table: nome ----- A B C D E F If you do: SELECT nome FROM tabela It will return me "A, B, C, D, E, F" . I would like it to come back from the last record to the first.    F, E, D, C, B, A. How coul...
asked by 17.12.2018 / 14:03
3
answers

make a grouping select per year

I have a client field in it I need to make a count of how many customers were registered during the years 2016, 2017 and 2018. I was doing 3 select, and in each one I made a where dataCadastro > = 2016-01-01 and dataCadastro
asked by 31.01.2018 / 16:10