Comments on: Working with the YUI DataTable Control, Part 2: Changing the Contents of the DataTable http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/ News and Artilces about Designing and Developing with Yahoo! Libraries. Sat, 26 Jul 2008 23:15:39 +0000 http://wordpress.org/?v=2.3.3 By: MangoOTK http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-426512 MangoOTK Tue, 22 Jul 2008 22:31:03 +0000 http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-426512 BTW, the first part of displaying the populated table is accomplished by something like this: $sql="SELECT id, name, DATE_FORMAT(date, '%c/%e/%Y') as date FROM `feeds`"; $encodable = array(); mysql_connect(localhost, $username, $password); mysql_select_db($database) or die("Unable to select database"); $result = mysql_query($sql); while($obj = mysql_fetch_object($result)) { $encodable[] = $obj; } $encoded = stripslashes(json_encode($encodable)); echo "{\"data\":".$encoded."}"; BTW, the first part of displaying the populated table is accomplished by something like this:

$sql=”SELECT id, name, DATE_FORMAT(date, ‘%c/%e/%Y’) as date FROM `feeds`”;
$encodable = array();

mysql_connect(localhost, $username, $password);
mysql_select_db($database) or die(”Unable to select database”);
$result = mysql_query($sql);

while($obj = mysql_fetch_object($result))
{
$encodable[] = $obj;
}

$encoded = stripslashes(json_encode($encodable));

echo “{\”data\”:”.$encoded.”}”;

]]>
By: MangoOTK http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-426454 MangoOTK Tue, 22 Jul 2008 21:19:10 +0000 http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-426454 Hi, I'm a newbi YUI-PHP-MySQL hacker and really appreciate the work you've done and all the great comments from those with more experience. I get the php-side really well, the ajax is hazy to me. What would really help is a consolidated example. Anyone willing to help? Something like this: 1. Index.html with working: YAHOO.widget.DataTable.prototype.saveCellEditor = function() 2. update.php with working: function ajax_Places_update() With all the necessary includes from the PHP back-end article 3. Simple SQL to set up the database or at least a description of the type of database & table required for interaction. I know I'm asking someone to do the work for me, but lots of folks appear to be searching for this starting point to build upon. I have been trying to hack together this stuff to post for about a week now and my wife is tired of hearing me curse. ;) It would make all the work you've already put in more concrete for those with a very basic understanding of ajax/php. Thanks for any response you give. I understand if this is too much to ask. This is already a great resource. Hi,

I’m a newbi YUI-PHP-MySQL hacker and really appreciate the work you’ve done and all the great comments from those with more experience. I get the php-side really well, the ajax is hazy to me.

What would really help is a consolidated example. Anyone willing to help?

Something like this:
1. Index.html with working: YAHOO.widget.DataTable.prototype.saveCellEditor = function()
2. update.php with working:
function ajax_Places_update()
With all the necessary includes from the PHP back-end article
3. Simple SQL to set up the database or at least a description of the type of database & table required for interaction.

I know I’m asking someone to do the work for me, but lots of folks appear to be searching for this starting point to build upon. I have been trying to hack together this stuff to post for about a week now and my wife is tired of hearing me curse. ;) It would make all the work you’ve already put in more concrete for those with a very basic understanding of ajax/php.

Thanks for any response you give. I understand if this is too much to ask. This is already a great resource.

]]>
By: Satyam http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-397781 Satyam Mon, 16 Jun 2008 17:52:02 +0000 http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-397781 <a href="#comment-394105" rel="nofollow">Jerry,</a> You may find an example in <a href="http://www.satyam.com.ar/yui/2.5.0/deleteRowsBy.html" rel="nofollow">Delete Rows By</a> Satyam Jerry,

You may find an example in Delete Rows By

Satyam

]]>
By: Satyam http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-397778 Satyam Mon, 16 Jun 2008 17:50:16 +0000 http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-397778 <a href="#comment-394680" rel="nofollow">Shane</a> You may find it in <a href="http://www.satyam.com.ar/yui/#phpjson" rel="nofollow">A PHP back end to YUI</a> Satyam Shane

You may find it in A PHP back end to YUI

Satyam

]]>
By: Shane http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-394680 Shane Wed, 11 Jun 2008 23:27:06 +0000 http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-394680 What should the php file look like, which takes the place of "myServer.php" What should the php file look like, which takes the place of “myServer.php”

]]>
By: Jerry http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-394105 Jerry Wed, 11 Jun 2008 02:35:09 +0000 http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-394105 Hi, Good example on the delete rows. But I use checkboxes so the user can select a which ones they want to delete and then they click on a "delete" button. I am not sure how to do this. thanks in advance! Hi,

Good example on the delete rows. But I use checkboxes so the user can select a which ones they want to delete and then they click on a “delete” button.

I am not sure how to do this.

thanks in advance!

]]>
By: Satyam http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-380277 Satyam Thu, 22 May 2008 21:28:03 +0000 http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-380277 <a href="#comment-379992" rel="nofollow">yui user</a> When this was written, YUI JSON utility didn't exist, that's why the text says 'user your favorite JSON parser'. Nowadays, that would be YAHOO.lang.JSON.parse but you might as well use some other of your choice. That is as far as the article is concerned, if you have further errors, please use the YDN developers list. yui user

When this was written, YUI JSON utility didn’t exist, that’s why the text says ‘user your favorite JSON parser’. Nowadays, that would be YAHOO.lang.JSON.parse but you might as well use some other of your choice.

That is as far as the article is concerned, if you have further errors, please use the YDN developers list.

]]>
By: yui user http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-379992 yui user Thu, 22 May 2008 11:10:54 +0000 http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-379992 hi Satyam, I used parseJSON, but it doesnot seem to recognise, also i tried using Yahoo.JSON.parse instead, but tjhat also is giving error messages. Please suggest in what way i can get error message sent by server, also i want to set error messages in server....any help/suugestion appreciated...thanks. hi Satyam,
I used parseJSON, but it doesnot seem to recognise, also i tried using Yahoo.JSON.parse instead, but tjhat also is giving error messages. Please suggest in what way i can get error message sent by server, also i want to set error messages in server….any help/suugestion appreciated…thanks.

]]>
By: Ashish http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-371985 Ashish Tue, 13 May 2008 17:40:02 +0000 http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-371985 Thanks myBuildUrl.call(this, record) worked. I had an unrelated bug. So please ignore my earlier question. Ashish Thanks myBuildUrl.call(this, record) worked. I had an unrelated bug. So please ignore my earlier question.

Ashish

]]>
By: Satyam http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-371797 Satyam Tue, 13 May 2008 08:40:59 +0000 http://yuiblog.com/blog/2007/09/26/satyam-datatable-2/#comment-371797 <a href="#comment-371693" rel="nofollow">Gupta</a> I suggested: myBuildUrl.call(this,this._oCellEditor.record) notice the .call after myBuildUrl. Gupta

I suggested:

myBuildUrl.call(this,this._oCellEditor.record)

notice the .call after myBuildUrl.

]]>