Questions tagged as 'mysql'

4
answers

Error inserting jSON in MySQL with PHP [closed]

I have a code PHP that causes an array to become jSON <?php $imagens = array('imagem1.jpg', 'imagem2.jpg', 'imagem3.jpg'); $json = json_encode($imagens); $inserir = mysql_query("INSERT INTO table VALUES ('$nome', '$descricao...
asked by 17.12.2015 / 14:28
1
answer

How to create an installer for tables and connection to the bank?

I would like to thank you in advance for your cooperation. I know it's possible, but I still have no idea how to do it. I have a script but it will be used for sale, but I would like the script in the middle to have a way to ask the client what...
asked by 21.02.2016 / 15:05
1
answer

User accessing site with name on link

I have a Web system in PHP and MYSQL that has a user registry. Users log in and access the system and are redirected to a panel: nomedosite.com/painel. What I need is for every user who registers on the system, he can access his panel more in...
asked by 23.02.2016 / 14:04
2
answers

Rule for parameter redirection

I'm trying to set up a friendly URL system, but I have the following problem: I have a page that has a list with multiple items. The page has this URL: http://localhost/personal/portifolio When the user accesses one of these items, he is...
asked by 06.03.2016 / 19:27
1
answer

php running while giving F5 while maintaining connection to the database

I have a function in Javascript that executes a PHP code, in this PHP I open connection to the database and send data if some entries receive 1 (waiting 1 minute to change their state). When I refresh the page before this 1 minute, it...
asked by 19.02.2016 / 14:57
1
answer

How to do 1 only query and distribute the result spread by the code?

Well, I have a site where I am in each area using a select, so I think I'm doing more queries than I should, is there any way to get the result done? follows an image of what I'm proposing <?phptry{$sql="SELECT * FROM anuncios ORDER BY RA...
asked by 02.03.2016 / 19:15
2
answers

How to create a trigger to save updates of two tables?

I have two tables: table1 : with three columns product_id , product_name , product_price ; table2 : with four columns tag_name , product_id , tag_name , tag_name li> I've created a new table3 : with three columns product_id ,...
asked by 16.12.2016 / 12:46
1
answer

Help with SQL Query MySql

I need to select All messages sent by user 1 to user 2 and to know of messages sent from user 2 to user 1. I am not able to mount the SQL query for the described situation. Message table: IdMsg, IdUserFrom, IdUSerTo, Data, Mensagem Sql t...
asked by 14.12.2016 / 23:46
1
answer

CSV file saved to the bank

I have a large CVS file and need to write it to my database the first line is the fields, which I have to validate if they are right and make some changes for example first line NAME, DATANASCIMENTO, NOMEMAE second line GUILHERME FREIRE, 02/1...
asked by 14.12.2016 / 15:21
1
answer

NullPointer Exception during registration using the MVC standard

I have a ready-made application that was created procedurally, but for learning purposes I decided to reprogram it using object orientation and the MVC pattern. While registering for a publisher, I'm getting the error NullPointerException...
asked by 25.10.2015 / 02:22