HeidiSQL

apps, mysql, win No Comments »

HeidiSQL is an easy-to-use interface and a “working-horse” for web-developers using the popular MySQL-Database. It allows you to manage and browse your databases and tables from an intuitive Windows® interface.

Adminer

blogroll, mysql, php No Comments »

Adminer

Adminer (formerly phpMinAdmin) is a full-featured MySQL management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server

MySQL GUI Tools

blogroll, mysql No Comments »
  • MySQL Administrator
  • MySQL Query Browser
  • MySQL Migration Toolkit

http://dev.mysql.com/downloads/gui-tools

  • MySQL Workbench (MySQL Workbench is a next-generation visual database design application that can be used to efficiently design, manage and document database schemata.)

http://dev.mysql.com/downloads/workbench

mysql_insert_id

blogroll, mysql, php No Comments »
       mysql_insert_id()

http://php.net/manual/en/function.mysql-insert-id.php

mysql_affected_rows

blogroll, mysql, php No Comments »
       mysql_affected_rows()

http://php.net/manual/en/function.mysql-affected-rows.php

simple mysql trigger examples

mysql No Comments »
#drop trigger
DROP TRIGGER `TRIGGER_NAME`
 
#auto DateTime, Date, Time
CREATE TRIGGER `TRIGGER_NAME` BEFORE INSERT ON `TABLE_NAME`
 FOR EACH ROW SET NEW.DATEFIELD = NOW()
 
#insert something in another table
CREATE TRIGGER `TRIGGER_NAME` AFTER INSERT ON `TABLE_NAME`
 FOR EACH ROW
  INSERT INTO another_table SET some_field = NEW.fieldfromparenttable, text_field = 'sometext'
 
#if statement
CREATE TRIGGER `TRIGGER_NAME` AFTER INSERT ON `TABLE_NAME`
 FOR EACH ROW BEGIN
  IF NEW.Type = 0 THEN
    INSERT INTO another_table SET ParentType = NEW.Type;
  END IF;
 END

Handy mysql class

blogroll, mysql No Comments »

SQL exercises

blogroll, mysql No Comments »

http://sql-ex.ru/

simple mysql while

mysql, php No Comments »
<?
 $query = mysql_query("SELECT name FROM Table");
 while ($item = mysql_fetch_object($query)) {
    echo $item->name;
    echo "<br>";
 }
?>

utf-8

mysql, php No Comments »
<?
  header('Content-Type: text/html; charset=utf-8');
?>

<?
 mysql_select_db("DataBase");
 mysql_query("SET NAMES UTF8");
?>

WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in