MySql Group_Concat

The result of GROUP_CONCAT is truncated to the maximum length that is given by the group_concat_max_len system variable, which has a default value of 1024. This will cause  data-destroying bugs in production. For this reason you should probably not use GROUP_CONCAT . At least you must set the value of group_concat_max_len to an insanely high value on every database server your application runs on. Like MAX or COUNT, GROUP_CONCAT is a MySQL aggregation function you can use whenever your query contains a GROUP BY. You can use it to retrieve a comma-separated list of all values in a given column …

Continue Reading

MySQL, CREATE FUNCTION Syntax

The general syntax of Creating a Function is : func_name : Function name func_parameter : param_name type type : Any valid MySQL datatype routine_body : Valid SQL procedure statement  The RETURN clause is mandatory for FUNCTION . It used to indicate the return type of function. Now we are describing you a simple example a function. This function take a parameter and it is used to perform an operation by using an SQL function and return the result. In this example there is no need to use delimiter because it contains no internal ; statement delimiters. Example : Query OK, …

Continue Reading

Using MySQL in ASP.Net

Many people have asked me for this tutorial, so here goes.For those of you who don’t know, MySQL is an open-source DataBase server. Being that it’s open-source, it’s also free. That’s about as low-cost as you can get. Of course, you may ask ‘Why use MySQL’? Did you read the previous sentences?? It’s free, as well as being a fairly robust database server!

Continue Reading

Instalando Apache + MySQL + PHP 5 no Windows

1. Download dos itens necessários Primeiro, faça o download dos programas a serem usados. Quanto ao Apache, usaremos o Apache 1.3.*, visto que na documentação do PHP existe a seguinte recomendação: “Não use Apache 2.0 e PHP em um sistema de produção, seja no Unix ou no Windows” (http://www.php.net/manual/pt_BR/install.apache2.php). – Apache: http://httpd.apache.org/download.cgi – MySQL: http://dev.mysql.com/downloads/ – PHP: http://www.php.net/downloads.php 2. Instalação – Execute a instalação do Apache e o instale com as configurações padrões. Se quiser, pode escolher outro diretório para a instalação. – Extraia o MySQL em uma pasta qualquer. Recomendo dentro da pasta onde você instalou o Apache. Ex: …

Continue Reading