CodeCanyon

Database Grid

  • Has been a member for 1-2 years
  • Bought between 10 and 49 items
rbibaseball says
Purchased

MFYZ ,

I finally got the script setup and it runs great…good job :). Some things to consider:

  • The pagination css is not compatible with i.e. (the numbers are barely legible.
  • The pagination drop-down does not click to page select when user has more pages than the limit in script.
  • Remember to remove the short tag ”<?” in grid.php as a user will not be able to bring up the script in newer versions of php.

    If you can provide an update on the pagination above, it would be appreciated.

  • 2 years ago
    • Has been a member for 3-4 years
    • Bought between 50 and 99 items
    • Referred between 1 and 9 users
    ecdoesit says
    Purchased

    Great script. It worked immediately when I plugged in my database and all the params. It would be great if column ASC and DESC could be applied to existing search results instead of reverting back to all.

    I’m able to just add “&grid[order]=COLUMNNAME&grid[sort]=desc” to the end of a search result URL to get that functionality.

    If you could advise me on how to the best way to incorporate that in to the column links, I think that would be a great update to this great script.

    Thanks and great job!

    1 year ago
    • Has been a member for 1-2 years
    • Bought between 10 and 49 items
    rbibaseball says
    Purchased

    Fixed the pagination view for IE and Chrome users. The pagination at bottom was not properly showing. All you have to do is open grid.php go to the code under:

    // link style pagination

    for ($i=1; $i <= $rows[pageCount]; $i++){ 
    $gridHTML .= '<li'.( $i == $rows[page] ? '<span class="selected">'. $i .'</span>':'<a href="'. str_replace('__page__', $i, $params[pageLink]) .'">'. $i .'</a>' ).''; }

    and add the right bracket to the first

    "<li"

    so that it reads

    $gridHTML .= '<li>'     
    
    ignore the li at end of this block...(automatically appended by code canyon) --></li>

    Firefox automatically closes the li by adding a right bracket whereas IE and Chrome does not causing the pagination to bunch up.

    1 year ago
    • Has been a member for 2-3 years
    • Bought between 10 and 49 items
    devgirl says
    Purchased

    Hi, Gonna have to agree with “7676_King” comment there are lots and lots of erros in this script – over 250 actually.

    Your reply “those are not errors” is incorrect they are PHP notices which may not be critical but they are errors as far as PHP is concerned and should have been fixed before putting this script into the public domain.

    The errors are occurring because you have not quoted the array key val names plus you have confusingly combined double and single quotes.

    More serious problems: 1. subscript out of range 2. use of short tags – which to less seasoned PHP devs will render the script useless since grid.php wont even run!!

    PHP must make intelligent assumptions as to what you meant to use ‘constant or variables index’s

    You have also referenced many data items before checking they are set i.e. isset(data-item) or exist or check for empty()

    Switching Notices off is bad practice and not recommended even though you can ignore them you should attend to them especially when ‘Selling’ a script to the general public without mention of issues.

    However, i’m using it and ive converted it to a PHP5 compliant class – some nice logic in there, so thanks for the work done.

    1 year ago
    Author
    mfyz mfyz replied

    You are absolutely right. I know I did’t write that code with best practices. I’m planing to work on this code to release a new update. So in that version there won’t be notices anymore.

    1 year ago
    • Has been a member for 2-3 years
    • Bought between 50 and 99 items
    eduardo12fox says
    Purchased

    Friend bought the script but not configured it works see the error:

    $value){ $paramsfields = array( ucfirst(str_replace(’_’, ’ ’, $key)), false, true, true ); $fields[] = $key; } } // default where clause if has if( $params[where] ) $where[] = $params[where]; // default order $order = $_GETgrid; if( !$order && $params[order] ) $order = $params[order]; $sort = $_GETgrid; if( !$sort && $params[sort] ) $sort = $params[sort]; // search if( $_GETgrid ){ // search field is searchable? if( $paramsfields[search_field] ][3] true ){ // adding where array $where[] = mysql_real_escape_string($_GETgrid) . ' like " '. $_GETgrid .' "'; } } // getting paged rows $rows = pagedrows(array( 'table' => $params[table], 'fields' => $fields, 'limit' => $params[limit], 'order' => mysql_real_escape_string($order) .' '. mysql_real_escape_string($sort), 'where' => ( $where ? (count($where) 1 ? $where0:implode(’ and ’, $where)):false ), ‘page’ => ( $params[page] ? $params[page] : $_GET[page] ) )); // post process if( $params[‘do’] && $rows[results] ){ foreach ($rows[results] as $key => $value){ eval(’$rowsresults = ’. $params[‘do’] .’($value);’); } } // search form foreach ($params[fields] as $key => $field){ if( $field3 == true ) $searchables[] = $key; } if( $params[searchable] && $searchables ){ // formu basalim $gridHTML .= ‘ ’; $gridHTML .= ‘

    1 year ago
    Author
    mfyz mfyz replied

    I’m submitting new update about this problems. Thanks for understanding.

    1 year ago
    • Has been a member for 4-5 years
    • Bought between 10 and 49 items
    • France
    evilping says
    Purchased

    Hi mfyz,

    Bought your script, though am having a little problem hope you can help me…

    the script is used as displayed :

    www.domain.com/index.php?file=main&file=list

    the data are displayed thats is great. the only problem is when i use the search, the page redirect to:

    index.php?grid[search_field]=name&grid[search]=john

    not to :

    index.php?file=main&file=list&grid[search_field]=name&grid[search]=john

    can you help me please

    1 year ago
    • Has been a member for 1-2 years
    • Bought between 10 and 49 items
    sjcb10b says
    Purchased

    con you please help in the area where does the search : example ‘where’ => ‘userid = ”$userid”’,

    the userid come’s from a session id and also how can i combined 2 fields

    ‘address, zip, state’ => array(‘Address’, 200, true, true),

    Thank you i will really apreciated ..

    11 months ago
    Author
    mfyz mfyz replied

    You need to write them as one where clause string of mysql which is for your example:

    “where” => ”`address` = ’$address’ AND `zip` = ’$zip’ AND `state` = ’$state’”,

    7 months ago
    • Has been a member for 3-4 years
    • Exclusive Author
    • Sold between 100 and 1 000 dollars
    • Bought between 100 and 499 items
    • United States
    supersam14 says
    Purchased

    I should have read the comments, I bought this to easily edit a table. The picture of the item is very misleading. I spent over an hour setting it up only to find that you can not edit the data. :x

    10 months ago
    • Has been a member for 2-3 years
    • Bought between 10 and 49 items
    Guardian says
    Purchased

    Of course you can edit the data! All you need to do is add the appropriate links in the postProcess function so when the grid is displayed, the ‘edit’ links appear.

    Your links should point to your own functions for data deletion as the grid class has no way of knowing what data you are using or if you even need an edit link.

    8 months ago
    • Has been a member for 2-3 years
    • Bought between 10 and 49 items
    techker says
    Purchased

    im confused.i edited the table=>

    and aray( array( /* field | name | width | sortable | searchable | database -----------------+---- defaults: | 100px | true | false | true -----------------+--—*/ ‘P_ID’ => array(‘P_ID’, 30), ‘NomProf’ => array(‘NomProf’, 120), //’konum’ => array(‘URL’, 200, true, true), //’zaman’ => array(‘Date’, 125, true, true), //’ip’ => array(‘IP’, 80), // ‘actions’ => array(‘Actions’, 100, false, false, false) // this is a manual field ), ‘order’ => ‘P_ID’, // default order (should be one of your field name) ‘sort’ => ‘desc’, // order direction (should be `asc` or `desc`) ‘where’ => ‘zaman like “2009%”’, // filter (this filter will be applied always) ‘do’ => ‘postProcessFunction’, // post processor for every row ‘limit’ => 20, ‘searchable’ => true

    it still shows no results….

    6 months ago
    Author
    mfyz mfyz replied

    Because you forgot the example code in where parameter. ‘where’ => ‘zaman like “2009%”’, That code filters your results with zaman field but it probably doesn’t exist in your database, so you get no results.

    Also make sure post process function doesn’t deletes any field from row array and returns row at the end. IF you’re not using post processing, you shouldn’t pass as parameter. It can cause problems.

    6 months ago
    • Has been a member for 2-3 years
    • Bought between 10 and 49 items
    techker says
    Purchased

    ok i got it going..now trying to figure out a delete field

    6 months ago
    • Has been a member for 0-1 years
    • Bought between 1 and 9 items
    • Malaysia
    d4sam says
    Purchased

    hi mfyz.. it get me confused..where should I start with ..which part of the code should I edit or which php file to be adjusted that could suit to my own database..? I’m quite new to PHP ..

    Thanks…

    5 months ago
    • Has been a member for 0-1 years
    • Bought between 1 and 9 items
    • Malaysia
    d4sam says
    Purchased

    still no reply..where’s the author?

    5 months ago
    • Has been a member for 0-1 years
    • Bought between 1 and 9 items
    • Malaysia
    d4sam says
    Purchased

    hi mfyz.. Ok, I managed to do this but the problem is why the table only showing only single line data whereby the table contains 2 more lines that should be shown? Help me please. Thanks..

    5 months ago
    Author
    mfyz mfyz replied

    Can you paste the grid code you’re running (just the parameters you used is enough)?

    Can you check parameters to make sure you’re setting only and right parameteres? Most of the time, problems caused because of unnecessary, missing parameter or wrong usage.

    There is a list of parameters explained in the documentation: http://projects.mfyz.com/grid/documentation/usage.html

    5 months ago
    • Has been a member for 0-1 years
    • Bought between 1 and 9 items
    • Malaysia
    d4sam says
    Purchased

    It’s okay mfyz..

    I managed to get it running..Thanks for the reply.

    5 months ago
    • Has been a member for 0-1 years
    • Bought between 1 and 9 items
    • Malaysia
    d4sam says
    Purchased

    Hi mfyz, When running the script, I found an error after I deleting the parameter : ‘where’ => ‘zaman like “2009%”’, // filter (this filter will be applied always).

    The error is Notice: Undefined index: where in “mydomain.com/demopage/codes/grid.php on line 94

    Notice: Undefined variable: where in “mydomain.com/demopage/codes/grid.php on line 127

    So, what’s the problem actually happened here?

    Hope to get reply from you soon?

    4 months ago
    • Has been a member for 0-1 years
    • Bought between 50 and 99 items
    pourang says
    Purchased

    Thank You For Your Usefull PHP Code. It speed up my projects. :) Best, Pourang

    3 months ago
    • Has been a member for 2-3 years
    • Bought between 10 and 49 items
    flamerz says
    Purchased

    the pageselect is working? i tryed some browser but when i choose page 2, 3.. and so on, its not loading the data. (im testing with the codecanyon demo too and its not refreshing the table neighter)

    2 months ago
    • Has been a member for 1-2 years
    • Exclusive Author
    • Bought between 10 and 49 items
    • United States
    BryanDesigns says
    Purchased

    How can i get the search function onto the home page?

    1 month ago
    • Has been a member for 1-2 years
    • Exclusive Author
    • Bought between 10 and 49 items
    • United States
    BryanDesigns says
    Purchased

    Also, the drop down menu with all the page numbers, when you click a new page number, it doesn’t change pages… how can i get this to work?

    1 month ago
    by
    by
    by
    by
    by