Questions tagged as 'mysql'

2
answers

I have the id of the state and the city, and now? [closed]

Hello, in a classified site with PHP and MySQL I made through Ajax the insertion of the state and the city. When selecting the state, the id is passed and it sends to the file getcidade.php that makes the select and returns the r...
asked by 24.08.2016 / 03:23
1
answer

Print only selected records in the checkbox

I have the following table, but I'm not sure how to use the checkbox, how do I print only the selected checkboxes? And as he is inside the table he is appearing in the print, how to make it not appear too. <table class='datatable table ta...
asked by 27.07.2016 / 23:49
2
answers

Modify foreign key for auto-increment

I have two tables in my bank membro, membro_grupo, grupo The grupo table has a column named id_grupo which is the primary key in this table. The membro table has a column named id_membro which is also a primary k...
asked by 31.07.2016 / 19:05
1
answer

I want the example of why substituting 'by' and '\' for parameters to a query is dangerous

I see many posts on this subject, but I do not see any examples that fit in my case. function sanitize($value) { $val = str_replace("'", "''", $value); $val = str_replace("\", "\\", $val); return $val; } The query would be m...
asked by 25.07.2016 / 23:22
1
answer

update multiple records with php mysql

I have a form that lists several records and I want to update the status field of these records but at one time but I can not. my for and code: <form id="form1" name="form1" method="post" action=""> <?php while($row_table = mysqli_...
asked by 18.07.2016 / 20:35
3
answers

insert multiple records checkbox mysql

I'm trying to insert information into multiple checkbox information at once, for example a news item is related to more than one category, so I just select the categories and save, but this is giving this error, Notice: Array to string convers...
asked by 15.07.2016 / 03:51
1
answer

PHP - Popular dropdown using tables name of a database

The title is already self-explanatory. I've tried everything, but I feel like everything I've done is completely wrong, haha. If anyone can help me, I need to do a dropdown where the values to be selected will be names of the tables in my databa...
asked by 19.10.2016 / 14:26
2
answers

Column Is Not Found With Inner Join

Lines: 1 - Data coming from the filter form 2 - This with I enter into a Model relationship function. I do this because I need to sort my list in order of the MEDIA column. Home 3 - The strange thing is that I need to do an INNER JOIN fo...
asked by 24.05.2016 / 16:54
1
answer

Inconvergence of consolidated results x by interval

I am doing a query for a 10-minute interval between dates, the problem is that when I give an between to count all the results it returns a value and when I divide those values by interval and somo at the end it always gives a result total great...
asked by 21.11.2016 / 19:43
1
answer

How to display a result using 2 selects

I have two tables, Products and Orders. I need to create a combobox for products and when the user chooses a product, the page has to display all requests related to the product, if I choose another product have to change the requests....
asked by 14.06.2016 / 17:48