Tags » Mysql

Find column Name in Database

SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME IN ('YourColumn Name 1','Your Column Name 2')
AND TABLE_SCHEMA='Your DB Name';
DataBase Stuff

Diferencias entre ENUM Y SET | mysql

Tanto ENUM como SET, sirven para determinar los valores que puede tener un campo de una tabla, es decir, puedes determinar que en un campo solamente pueda contener valores de una lista definida… 432 more words

Mysql

Install Prosper202 with Nginx, MySQL and PHP-FPM on Ubuntu

In this tutorial we are going to show you how to install Prosper202. Made by Tracking202, Prosper202 is a self-hosted application that lets you track and optimize all your marketing campaigns. 19 more words

MySQL Synonyms?

This morning at work a coworked ask me about how he can create a synonym in a MySQL database for a new application which he are developing. 30 more words

General

Export MySQL Database Using PHP Code

Using bellow snippet we have to download and store on server MySQL database easily. Just change database name and it’s┬ácredentials.


EXPORT_TABLES("localhost","username","password","database" ); //or add 5th parameter(array) of specific tables: array("mytable1","mytable2","mytable3")
function EXPORT_TABLES($host,$user,$pass,$name, $tables=false, $backup_name=false ){

$mysqli = new mysqli($host,$user,$pass,$name); $mysqli->select_db($name); $mysqli->query("SET NAMES 'utf8'");
$queryTables = $mysqli->query('SHOW TABLES'); while($row = $queryTables->fetch_row()) { $target_tables[] = $row[0]; } if($tables !== false) { $target_tables = array_intersect( $target_tables, $tables); }
foreach($target_tables as $table){

$result = $mysqli->query('SELECT * FROM '.$table);
$fields_amount=$result->field_count; $rows_num=$mysqli->affected_rows;

$res = $mysqli->query('SHOW CREATE TABLE '.$table);

if(!$res) {
//echo $link->error;
} else {
$TableMLine=$res->fetch_row();
}
$content = (!isset($content) ? 227 more words
PHP

Como saber la version de mysql

Abrimos mysql Command Line Client e introducimos la contrase├▒a 8 more words

Mysql

Convert quote attribute to order

In your config.xml file under the global tag add the following code:

<fieldsets>
<sales_convert_quote>
<custom_field>
<to_order>*</to_order>
</custom_field>
</sales_convert_quote>
</fieldsets>

Where custom_field is the field created with same name in sales_flat_quote and sales_flat_order. 23 more words

Magento