There was a problem with the response text

Discuss MySQL Ajax Table Editor

Re: There was a problem with the response text

Postby admin » Wed Jun 10, 2009 2:07 pm

Have you seen how long it takes to update your table without using mate? For example you could run
Code: Select all
update table_name set column1 = 'value1', column2 = 'value2' where id = '1200000'

or something similar in phpmyadmin or from the command line and see how long it takes. It may be that mysql is slow when updating such a large table.
admin
Site Admin
 
Posts: 1502
Joined: Fri Jul 11, 2008 1:34 am

Re: There was a problem with the response text

Postby MrMatt » Wed Jun 10, 2009 2:49 pm

Yes, I did. The query took 0.0016 sec in phpmyadmin to perform the same single field update.
MrMatt
 
Posts: 22
Joined: Mon Jun 08, 2009 8:33 pm

Re: There was a problem with the response text

Postby admin » Wed Jun 10, 2009 2:56 pm

Where exactly does the script slow down? Is it when the edit screen displays or when you hit update?

When you first load the page does it take a while for the table to show up? If so it may be that the problem is displaying the table after updating and not with the actual update.
admin
Site Admin
 
Posts: 1502
Joined: Fri Jul 11, 2008 1:34 am

Re: There was a problem with the response text

Postby MrMatt » Wed Jun 10, 2009 4:47 pm

It takes about 15-20 seconds for the table view of 20 entries to load. This includes after clicking update as well as any page reload that involves querying the entire table. 15 seconds is not unbearable given the size of this table I'm just hoping to reduce the time a little if at all possible much like when I use a predefined query in a regualr php page of say LIMIT 0, 20 which loads instantly.

Thanks for your fast responses, this really is a great script!
MrMatt
 
Posts: 22
Joined: Mon Jun 08, 2009 8:33 pm

Re: There was a problem with the response text

Postby admin » Wed Jun 10, 2009 5:15 pm

The script has to calculate the total number of rows returned for creating the Page # drop down and for user feedback.

Can you execute these two snippets of php code and tell me which one is faster? Currently mate uses the first method of determining the # of rows returned from the query, however if the second way is considerably faster on big tables I will switch it.
Code: Select all
$query = "select count(*) as num_results from table_name";
$result = mysql_query($query);
if($row = mysql_fetch_assoc($result))
{
   echo $row['num_results'];
}


Code: Select all
$query = "select primary_column from table_name";
$result = mysql_query($query);
echo mysql_num_rows($result);


If both of these code snippets execute quickly then it must be another problem with the script.
admin
Site Admin
 
Posts: 1502
Joined: Fri Jul 11, 2008 1:34 am

Re: There was a problem with the response text

Postby admin » Wed Jun 10, 2009 7:20 pm

I just did some testing on a table with 561,000 records and the method mate currently uses to get the # of rows returned is considerably faster.

One thing I did notice is that when I ordered by a column without an index or a join column it took quite a bit longer to load. What column are you ordering by? Does it have an index on it or are you joining that column to another table? Try ordering by the primary id and see if that helps anything.
admin
Site Admin
 
Posts: 1502
Joined: Fri Jul 11, 2008 1:34 am

Re: There was a problem with the response text

Postby MrMatt » Wed Jun 10, 2009 7:33 pm

That was it. I'm so used to working with tables that have smaller datasets that I didn't even think twice about using a nonindexed column to order by. I set it to order by the id which is indexed and it is incredibly fast. Thanks so much! I will recommend this script to everyone I know that will find it useful. I also really appreciate that you have made it affordable.
MrMatt
 
Posts: 22
Joined: Mon Jun 08, 2009 8:33 pm

Re: There was a problem with the response text

Postby MrMatt » Tue Dec 29, 2009 5:38 pm

I am trying to set this up with the latest downloaded version on a GoDaddy hosted site of mine. I am getting this same type of error message when using the default examples. http://ohcripes.com/W/index.php

"There was a problem with the response text
<b>Fatal error</b>: Call to undefined function: mb_convert_case() in <b>/home/content/m/a/t/mattlind78/html/W/php/AjaxTableEditor.php</b> on line <b>113</b>"

Since GoDaddy limits my ability to add php functions is there any workaround?

Thanks. This is a fantastic script. I have used it on other sites that are on servers I own without problems.
MrMatt
 
Posts: 22
Joined: Mon Jun 08, 2009 8:33 pm

Re: There was a problem with the response text

Postby admin » Tue Dec 29, 2009 6:17 pm

You may be able to use your own custom php.ini file and uncomment the mbstring module or use an .htaccess file to enable it. If this doesn't work I would contact go daddy and see if they can install/enable the mbstring module for you. It is strange that they don't have it enabled by default since phpmyadmin uses it also.

Another option would be to create your own mb_convert_case function.
admin
Site Admin
 
Posts: 1502
Joined: Fri Jul 11, 2008 1:34 am

Re: There was a problem with the response text

Postby MrMatt » Tue Dec 29, 2009 8:17 pm

Can you give me an example of how I would enable it using a .htaccess file?
MrMatt
 
Posts: 22
Joined: Mon Jun 08, 2009 8:33 pm

PreviousNext

Return to Open Discussion

Who is online

Users browsing this forum: No registered users and 13 guests

cron