djxyas Posted April 27, 2007 Share Posted April 27, 2007 Dear sir I am stuck in one problem, I want to display data in the tables using PHP, data will be accessed from MySQL. It should have a delete function, edit function and view function. An example of what I need is attached. Can please somebody make an easy code for it and paste it. I will appreciate your help. Regards Shawn [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/48985-arrange-data-in-tables-using-php/ Share on other sites More sharing options...
per1os Posted April 27, 2007 Share Posted April 27, 2007 http://www.google.com/search?hl=en&q=php+mysql+datagrid You are basically asking for someone to create all of your code for you, not going to happen. If you want that goto the freelance form. If not I suggest looking into a PHP Datagrid. The code is already done. Quote Link to comment https://forums.phpfreaks.com/topic/48985-arrange-data-in-tables-using-php/#findComment-239974 Share on other sites More sharing options...
djxyas Posted April 28, 2007 Author Share Posted April 28, 2007 Dear sir Please don't talk on behalf of everyone. I request to help me please. Regards Shawn Quote Link to comment https://forums.phpfreaks.com/topic/48985-arrange-data-in-tables-using-php/#findComment-240169 Share on other sites More sharing options...
MadTechie Posted April 28, 2007 Share Posted April 28, 2007 OK NO goto the freelance section THATS THE RULES Quote Link to comment https://forums.phpfreaks.com/topic/48985-arrange-data-in-tables-using-php/#findComment-240172 Share on other sites More sharing options...
Silverado_NL Posted April 28, 2007 Share Posted April 28, 2007 Can please somebody make an easy code for it and paste it. PHP Help is found on the PHP HELP forum!!! For complete custom written scripts you should go to the freelance forum like "frost110" suggested (AND AS THE FORUM RULES STATE) for complete script you could also search http://www.hotscripts.com nice day, dear sir Quote Link to comment https://forums.phpfreaks.com/topic/48985-arrange-data-in-tables-using-php/#findComment-240174 Share on other sites More sharing options...
djxyas Posted April 28, 2007 Author Share Posted April 28, 2007 Dear sir Thank you for your reply, I will post my query in the freelance section. Regards Shawn Quote Link to comment https://forums.phpfreaks.com/topic/48985-arrange-data-in-tables-using-php/#findComment-240346 Share on other sites More sharing options...
djxyas Posted April 28, 2007 Author Share Posted April 28, 2007 One more thing... Can somebody explain me, what all stuff is required to make datagrid in PHP, how it is made, step by step explaination. Regards Shawn Quote Link to comment https://forums.phpfreaks.com/topic/48985-arrange-data-in-tables-using-php/#findComment-240348 Share on other sites More sharing options...
heckenschutze Posted April 28, 2007 Share Posted April 28, 2007 Dear sir Please don't talk on behalf of everyone. I request to help me please. Regards Shawn Don't break the rules then. Quote Link to comment https://forums.phpfreaks.com/topic/48985-arrange-data-in-tables-using-php/#findComment-240349 Share on other sites More sharing options...
Barand Posted April 28, 2007 Share Posted April 28, 2007 At it's most basic, <?php include 'db.php'; //connnection stuff function table2Table($tname) { $result = mysql_query("SELECT * FROM `$tname` "); $str = "<TABLE border='1' cellpadding='4'>\n"; // column headings $str .= "<tr>\n"; while ($fld = mysql_fetch_field ($result)) { $str .= "<th>{$fld->name}</th>\n"; } $str .= "</tr>\n"; // list data while ($row = mysql_fetch_row($result)) { $str .= "<tr>\n"; foreach ($row as $field) { $str .= "<td>$field</td>\n"; } $str .= "</tr>\n"; } $str .= "</TABLE>\n"; return $str; } // call function echo table2Table('mytablename'); ?> Quote Link to comment https://forums.phpfreaks.com/topic/48985-arrange-data-in-tables-using-php/#findComment-240363 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.