We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionI was wondering if there are any PHP code, modules, plugins that wo开发者_开发知识库uld allow me to build my own MySQL queries. E.g. The query builder that phpMyAdmin uses lets you make queries using dropdown menus.
It has to be a builder that will be on a website not software or application!
Must be user friendly! visual etc
When you say "needs to be on a WEBSITE", you are asking for Javascript/Jquery and not PHP
You want this ::
http://plugins.jquery.com/project/SQL_QUERY_BUILDER
Demo for above http://ksistem.com/jquery/sqlbuilderdemo.htm
in the Iframe type of thing on that page, scroll down to see the menu to build new queries.
OR This (more detailed)
http://aspquerybuilder.net/default.aspx
and this might also help ::
http://sourceforge.net/projects/myquerybuilder/
Try the following tools. These does the same work of PhpMyAdmin but no guarantee that they would satisfy your taste.
1.Adminer (formerly phpMinAdmin) A full-featured MySQL management tool written in PHP. Does more or less everything phpMyAdmin however consist of a single file only that is ready to upload to your servers and connect to the DB.
2.Navicat This, in my opinion, is the best MySQL client out there. It does everything you want from a very user friendly interface. However, it doesn’t come free. There is a small price tag to it but is well worth it!
3.Sequel Pro One for the Mac users.
4.SQLWave
5.SQLyog
6.BlueSQL
Free web based DB management tool.
7.SQL Buddy
9.DBDesigner 4
10.SQLGate
11.HeidiSQL
Is this what you want?
I don't know of any like that, but you could just use phpMyAdmin and copy the query that's generated?
@sqlmole, there is no such tool that will let you build a query such as how many people purchased bananas. You will have to develop such a system. However, apart from PHPMyAdmin, MySQL GUI Tools from MySQL itself and WebYog are some tools known to me which can some how help you create queries visually. I would also love to see alternatives.
What about this jQuery based SQL Query Builder?
I guess you might want to take a look at SQLBuilder https://github.com/c9s/SQLBuilder
which is MIT licensed, and it can generate cross platform SQL queries (mostly) for you:
use SQLBuilder\Universal\Query\SelectQuery;
use SQLBuilder\Driver\MySQLDriver;
use SQLBuilder\Driver\PgSQLDriver;
use SQLBuilder\Driver\SQLiteDriver;
$mysql = new MySQLDriver;
$args = new ArgumentArray;
$query = new SelectQuery;
$query->select(array('id', 'name', 'phone', 'address','confirmed'))
->from('users', 'u')
->partitions('u1', 'u2', 'u3')
->where()
->is('confirmed', true)
->in('id', [1,2,3])
;
$query
->join('posts')
->as('p')
->on('p.user_id = u.id')
;
$query
->orderBy('rand()')
->orderBy('id', 'DESC')
;
$sql = $query->toSql($mysql, $args);
var_dump($sql);
var_dump($args);
精彩评论