Jump to content

can someone help with phpMyDataGrid?


mmoalem

Recommended Posts

Hi there - got few steps further with my project and got stuck again...

found this script (phpMyDataGrid from http://www.gurusistemas.com/_guru/indexdatagrid.php?page=docs)

and implemented it into my site. as it is it is working fine and i can update my records in an orderly manner.

now, what i would like to do is having a field called keywords in which i can choose one or more pre-defined keywords using tick boxes or maybe a combobox. the only option included in the script is a 'select' option but with that i can only choose one value.

putting it differently - the database is of music tracks, each track can have one or more different characteristics (slow, fast, electronica, rock, tense, horror etc...) all these are predefined. i can moanualy write these into each record in the keywords field but that will be tedious and prone to spelling mistakes...

here are the code pages:

<?php /*
Copyright (c) 2007-2008, Gur� Sistemas and/or Gustavo Adolfo Arcila Trujillo
All rights reserved.
www.gurusistemas.com

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
  in the documentation and/or other materials provided with the distribution.
    * Neither the name of the Gur� Sistemas Intl nor Gustavo Adolfo Arcila Trujillo nor the names of its contributors may be used to
  endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS  "AS IS"  AND ANY EXPRESS  OR  IMPLIED WARRANTIES, INCLUDING, 
BUT NOT LIMITED TO,  THE IMPLIED WARRANTIES  OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT
SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,  INDIRECT,  INCIDENTAL, SPECIAL, EXEMPLARY,  OR CONSEQUENTIAL 
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF  USE, DATA, OR PROFITS;  OR BUSINESS 
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE 
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 

phpMyDataGrid 2007 is Free, but if you want to get even more power consider upgrade to PRO, contact us and get a special discount.

Please remember donating to phpMyDataGrid Free is one way to show your support, copy and paste in your internet browser the following link to make your donation
https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=tavoarcila%40gmail%2ecom&item_name=phpMyDataGrid%202007&no_shipping=0&no_note=1&tax=0&currency_code=USD&lc=US&bn=PP%2dDonationsBF&charset=UTF%2d8

For more info, samples, tips, screenshots, help, contact, forum, please visit phpMyDataGrid site  
http://www.gurusistemas.com/indexdatagrid.php

To get more info about the professional version, visit: http://www.gurusistemas.com/

*/ ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>phpMyDatagrid - Sample file</title>

<?php

include ("phpmydatagrid.class.php");

$objGrid = new datagrid;

$objGrid -> friendlyHTML();

$objGrid -> pathtoimages("./images/");

$objGrid -> closeTags(true);  

$objGrid -> form('employee', true);

$objGrid -> methodForm("post"); 

$objGrid -> total("salary,workeddays");

$objGrid -> searchby("id,name,lastname,afiliation");

$objGrid -> linkparam("sess=".$_REQUEST["sess"]."&username=".$_REQUEST["username"]);	 

$objGrid -> decimalDigits(2);

$objGrid -> decimalPoint(",");

$objGrid -> conectadb("localhost","server","password", "database");

$objGrid -> tabla ("ppl_tracks");

$objGrid -> buttons(true,true,true,true);

$objGrid -> keyfield("RECNO");

$objGrid -> salt("Some Code4Stronger(Protection)");

$objGrid -> checkable(false);

$objGrid -> TituloGrid("Update Records");

$objGrid -> FooterGrid("<div style='float:left'>© 2007 Gurusistemas.com</div>");

$objGrid -> datarows(50);

$objGrid -> paginationmode('links');

$objGrid -> orderby("RECNO", "ISRC");

$objGrid -> FormatColumn("RECNO", "ID", 5, 5, 1, "50", "center", "integer");
$objGrid -> FormatColumn("Track", "Track", 30, 30, 0, "150", "left");
$objGrid -> FormatColumn("Artist", "Artist", 30, 30, 0, "150", "left");
$objGrid -> FormatColumn("BPM", "BPM", 5, 5, 0, "50", "right");
$objGrid -> FormatColumn("RecordingName", "Rec Name", 10, 10, 0, "100", "center", "text");
$objGrid -> FormatColumn("Keywords", "Keywords", 60, 300, 0, "60", "left", "check:slow:medium:fast");
$objGrid -> FormatColumn("Composed", "Composed", 2, 2, 0,"50", "center", "check:No:Yes");
$objGrid -> FormatColumn("Mixed", "Mixed", 2, 2, 0,"50", "center", "check:No:Yes");
$objGrid -> FormatColumn("Description", "Description", 90, 300, 0, "90", "left", "text");
$objGrid -> FormatColumn("FileName", "File", 90, 300, 0, "90", "left", "text");

$objGrid -> where ("");

$objGrid -> setHeader();
?>
</head>

<body>
<?php 
/* AJAX inline edition comes in two flawors */
/*	silent: To save record, just enter or double click */
/*	default: To save record, must click icon */
/* try yourself and see which one likes more (My preferred is silent) */
$objGrid -> ajax("silent");

$objGrid -> grid();

$objGrid -> desconectar();
?>
</body>
</html>

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.