MyAjax is a MySQL Ajax Table viewer which allows for sorting, searching, and viewing of large amounts of MySQL table data in a quick and easy to use Ajax web interface. MyAjax features Ajax Sortable Columns, Ajax Search, and Ajax Paginated Results. Uses jQuery for Ajax calls and Javascript functions. Config file includes customisation variables to set which fields to display and their default sort order, which field to search on, results per page and more. Click to view MyAjax Demo.
MyAjax Feature List:
- Uses jQuery.
- Ideal for large amounts of MySQL data.
- Easily browse a SQL database via Ajax.
- Only loads data that is required.
- Ajax search.
- Paginated results.
- Set how many results to view per page.
- Ajax sortable columns.
- Specify which SQL fields to display
- Specify which database field Ajax search is performed on.
- Fluid table width and clean styling.
MyAjax Uses:
- Simply browsing a MySQL table
- Allowing customers to easily search and browse a product list
- Maintain staff lists and directories
- Quickly search a databases contents
The download includes demo code and instructions of how to set this up on your website. config.php is all you need to edit to have it up and running within 5 minutes of downloading.
Ajax Powered MySQL Table Viewer
- Number of Downloads: 137
- Number of Files: 14
- Total File Size: 31.2kb
- Compatible Browsers: IE6, IE7, IE8, Firefox 2.5+, Opera, Safari
good script, thanks!
Add in the optional ability to do inline edits and I’d pay $50 for that.
Good stuff!
The inline edit feature would be awesome…I would be happy paying more for this feature too.
Yes!!! This script is perfect, but…I would like to add, modify, and remove the records. If You can add this option, please contact me!
Thanks for your suggestion, we are working on adding an inline edit feature to this script, it should be available to download within the next few weeks.
Very Nice!
Is it possible to have a “search” button instead of loading each time we add a letter?
Yes no problem, just add the following code to index.html, and remove the onkeyup event for the “searchText” input.
I was wondering how easy it would to show records with a scroll up/down instead of showing the records on several pages ?
This can be done quite simply by removing the page limit, and then editing the Ajax Table div setting a maximum height and overflow. e.g:
Please also let me know when the inline edit feature will be available.
In addition to the text search I’d like to be able to narrow the results by adding additional search fields, such as a dropdown for the model. Can this be done?
Yes this can be done quite easily, to search the table for a specific term just use the Javascript function:
So if you add an onchange event to your drop down like this:
That should create the desired effect.
absolutely loving this script. so simple and so powerful!
well worth the money (and quite a lot more in my view).
i am just wondering if it’s possible to have it update on pressing enter, rather than onkeyup.
is this possible?
This should work for you. Remove the onkeyup event handler from the search input in index.html. Then add this bit of code into ajaxTables.js:
2
3
4
5
if(e.keyCode == 13) {
searchTable($('#searchText').val());
}
});
This uses a bit of jQuery to capture the key press and if it is an enter/return will perform the search for you.
Could be a column to show pictures in each row? ie I have a column of pictures and I would like to see those pictures in each row
Thanks for the suggestion we are working on a few updates to this script one of which includes displaying images in the table.
Hi
I was wondering if you could have 2 or more search boxes. For example to have a date range or something similar.
Yes you should just be able to duplicate the search input as many times as you like, searching for a range of dates would be more involved than just specifying a search string though but I’m sure it’s possible.
Hi,
what about..
1) fix column width for each column
2) pictures
3) pictures with links (e.g. submit button)
4) default sorting (e.g. lowest price)
Torben
Hi Torben,
1) At the moment each columns width is fluid and the table wrapped by a container div so that it is flexible around different sized content. That said it would be a nice feature to define column width in the config file, this is is something we will look at in our next update.
2) Pictures will come in our next update.
3) The next update you will be able to define a column as HTML so that it can include links and forms from within a cell.
4) This can already be done, in config.php there is an option for default sort column, and default sort order.
What’s the status of the latest update? I think this is a great tool and have implemented it on one of my sites but can’t wait for the inline editing and the other mentioned features.
Also, has there been any thought behind opening up a forum on this site and letting folks create their own mods to this script?
A new version will be available within the next couple of weeks, we want to make this as useful as possible to people so have taken time to add the features that have been requested. The forum is a possibility, we are focussing on getting the next few scripts and updates available first, then we will see about a forum if it will be of use to people.
I was wondering before I purchase if there is a way to make it search across multiple fields instead of just one?
Yes, if no search field is specified in the config file then the search is performed on all visible columns.
Hi, great script just couple of questions.
1)Is it possiable to have the script search a field but keep it hidden (IE i use this script on a movie website and would like it so the search can look for “Alt_title” but i dont want the alt title to be displayed?)
2)How would i go about using more than 1 mysql table in a search (like table join or something along them lines)
3)How do i call a row variable so i can manipilate it to do things like display the “Title” in Bold or if value of rating is =>10 Show (recommended etc)
1) In the config file you can define which field the Ajax Search is performed on, so you can set it to “Alt_title”, even if it is not displayed. You can also list which fields to be shown in the config file.
2) table.php is where the MySQL data is queried and displayed in a table. You could potentially add a JOIN onto the query on line 76, I haven’t tested this but it would go something like:
3) Formatting a column could be done with Javascript, and this is something we will include in our next update. If you call the following function after the data table has loaded (put this in the $(document).ready(function() {}); bit in index.html). And specify a fieldName. This example will format a column in Bold:
2
3
4
5
6
7
8
9
10
11
12
13
14
$('#ajaxtb th').each(function() {
if($(this).text() == fieldName){
var colnum = $(this).parent().children().index($(this));
}
$('#ajaxtb tr').each(function() {
$('td', this).each(function() {
if($(this).parent().children().index($(this)) == colnum){
$(this).html('<b>' + $(this).text() + '</b>');
}
});
});
});
}
Hello, can I search by todays date?
Thanks!
Alex
Yes, if this is a field in your table.
Amazing! Just what I was looking for! And i just bought it
looks like what i want.. how easy is this to set up for someone who knows almost nothing about mysql? i have tried setting up countless number of similar table viewers but so far havent been able to figure out how to get them to work.
So long as you have a MySQL database setup, this script can just be dropped on to your webserver once specifying the table you wish to view and access details in the config file.