Questions tagged as 'mysql'

9
answers

How to prevent SQL injection in my PHP code?

I developed a page in PHP for internal use of the company I work with and only very few people use it. You can use this page to do some queries, insertions, changes and deletions of a table in a MySQL database, however I believe that my PHP code...
asked by 03.02.2014 / 13:37
6
answers

Why should not we use functions of type mysql_ *?

A very common question is why should we stop using mysql_ * functions? For example mysql_query() , or mysql_connect() . I see that many people use them, or stop using them but do not know the real reason. Why should they stop bein...
asked by 18.12.2013 / 12:27
8
answers

Giving a "SELECT" before an "INSERT" is a safe way of not having duplicate records?

I have a table with a codigo column. I can not set it as primary key. On a system that receives many notifications before it checks with a SELECT to see if that code already exists in the table. If it does not exist it gives INS...
asked by 16.01.2014 / 16:39
5
answers

How do I get the name and attributes of tables from a MySQL database?

How to get the names of all tables in the MySQL database? How to get the attributes (name, type, etc ...) of a given table in the MySQL database?     
asked by 11.12.2013 / 18:08
2
answers

What are the differences between MyISAM and InnoDB?

What are the main differences between engines MyISAM and InnoDB and what is the most appropriate situation for each? I know that MyISAM does not support FOREIGN KEY but supports FULLTEXT , while InnoDB...
asked by 24.11.2014 / 20:15
5
answers

MySQL Limit Equivalent in SQL Server

Does anyone know how to relate the differences between MySQL and SQL Server, including using LIMIT n,n ? Or if they have a link that lists the differences would be cool. Example SELECT * FROM tabela LIMIT 50, 100 What would be the...
asked by 26.03.2014 / 17:01
4
answers

How to create a real-time notification system similar to Stack Overflow?

I am developing a Help Desk system, and would like some ideas on how to create a notification system similar to Stack Overflow itself, whenever any new support is registered. I want to use PHP, MySQL and jQuery only. Should I use window...
asked by 16.03.2014 / 20:21
4
answers

Constraint on table change with subquery

MySQL's documentation says:    You can not change a table by selecting data from it in a subquery This applies to DELETE , UPDATE and INSERT operations. The solution is usually to replace the subquery with something...
asked by 09.09.2017 / 04:56
4
answers

How to package and distribute a web system?

I need a web system, including the PHP server itself, as well as MySQL to be "packaged" in an executable file, which allows the lay user to use it in a kind of browser of their own. What steps would you need to take to make this system distribut...
asked by 07.01.2014 / 03:24
2
answers

What is the LOCK TABLES command for?

These days I came across a snippet of a SQL that had the command LOCK TABLES . I had never seen this before, and from what little I could see, it seems to me that this would be to lock the table during insertion or update. But I want...
asked by 17.08.2018 / 18:19