MySQL data comparison of two databases

I’m trying to compare two databases using dbForge MySQL. I managed to sync two database schemas with dbForge which went well. So then then next step I tried to do was sync the data of two databases. Here is a snapshot of the data that was compared. Notice the table ‘ratings’ needs 3 inserts from the source table to the target table:

dbforge mysql data comparison results

When I create the sql statements, this is what was created by the “Show Synchronization Wizard” button:

INSERT INTO ratings(id, rating) VALUES (62, 2);
INSERT INTO ratings(id, rating) VALUES (61, 4);
INSERT INTO ratings(id, rating) VALUES (63, 3);

an error occured with dbForge MySQL data synchronization.

Here is the snapshot to the ‘ratings’ table:

dbforge mysql ratings table schema.

And here is the text MySQL statement for creating the ‘ratings’ table:

CREATE TABLE skincar3_cosmetic.ratings(
  id INT(11) NOT NULL AUTO_INCREMENT,
  rating TINYINT(4) NOT NULL,
  div_id TEXT NOT NULL,
  ip TEXT NOT NULL,
  PRIMARY KEY (id)
)
ENGINE = MYISAM
AUTO_INCREMENT = 1
CHARACTER SET latin1
COLLATE latin1_swedish_ci;

So why does it give me this error when in the first step I synced the two database schemas using dbForge MySQL? I know the workaround is to simply allow null values for the field ‘ip’ and then the errors don’t occur but this is an extra step.

The other option is to change the MySQL statement as follows:

INSERT INTO ratings(id, rating, div_id, ip) VALUES (62, 2, '', '');
INSERT INTO ratings (id, rating, div_id, ip) VALUES (61, 4, '', '');
INSERT INTO ratings (id, rating, div_id, ip) VALUES (63, 3, '', '');
  • Share/Save/Bookmark

Dbforge MySQL backup database (multiple tables)

Here is the snapshot when I right click on the Tables of the Database Explorer:
dbforge mysql right click on tables of database explorer

Here is the snapshot when I right click on the Database of the Database Explorer:
right click on the database link of the database explorer

Here is the snapshot when I right click on the Database menu:
right click on the database menu of the dbforge ide

  • Share/Save/Bookmark

ipod Music Library Remember Playback Position Time

I’m having problems with syncing my iTune Music Library’s playback position time with my iPod shuffle. I want it so I know where I left off when I’m listening to some sermons. I’ve posted this question on a forum to find out the answer if there is one. I’ve created a video link to this problem:

ipod Music Library Remember Playback Position Time video

  • Share/Save/Bookmark

ipod Podcast Library Remember Playback Position Time

I’m trying to figure out how to sync my iTune Music Library’s playback position time with my iPod shuffle. I managed to figure out how to sync my iTune Podcast Library’s playback position time with my iPod shuffle as demonstrated in this video. I posted this question in a forum and will post the answer when I find out.

ipod Podcast Library Remember Playback Position Time video

  • Share/Save/Bookmark

Automatically fill out forms using MySQL, PHP

I want to login to a page and then automatically submit a form. The form’s data is drawn from a MySQL db. I know PHP Curl a bit but I believe it can’t handle javascript or ajax-based forms well. I briefly read about Java’s HTMLUnit and it seems like this can handle ajax created forms too but I’m not certain. If there are multiple page then it would be nice to automate this but for now I don’t mind if I have to click on the next button to get to the 2nd page of a form and then automatically out this form’s data from the MySQL db. I don’t mind about the captcha either. Right now I’m using Roboform to automate some of that tasks but the data is not drawn from a MySQL db and I have to copy and paste some of the data from an excel sheet. Anyway, if you know of a solution please let me know.

  • Share/Save/Bookmark

Wordpress-allowed memory size exhausted

I received this error from Wordpress 2.9.2. I think I encountered this before:

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 1966080 bytes) in /home1/discoup9/public_html/tutorialref/blog/wp-includes/class-simplepie.php on line 5409

When I went to the line 5409 on the class-simplepie.php I see this:

$restrictions[] =& new $this->feed->restriction_class($restriction_relationship, $restriction_type, $restriction_value);
  • Share/Save/Bookmark

Javascript AJAX error in IE-unknown runtime error

Javascript AJAX causes unknown runtime error in IE javascript debugger for IE 7.x and 8.x.

I have this code that works perfectly in firefox but IE 7.x and 8.x has a problem:

function revDescr(condition_id, rev_cat_id) {
    this.condition_id = condition_id;
    this.rev_cat_id = rev_cat_id;

    //update the reverse entry description
    xmlhttp10=GetXmlHttpObject(); //if xmlhttp object not created
    if (xmlhttp10==null) {
        alert ("Browser does not support HTTP Request");
        return;
    }

    var url="./include_ajax/updateRevDescrSi.php";
    url=url+"?condition_id="+this.condition_id;
    url=url+"&rev_cat_id="+this.rev_cat_id;
    url=url+"&sid="+Math.random();
    xmlhttp10.open("GET",url,true);
    xmlhttp10.onreadystatechange=stateChangedRevDescr;

    xmlhttp10.send(null);
}

function stateChangedRevDescr() {
    if (xmlhttp10.readyState==4) {
        var data = xmlhttp10.responseText;
        document.getElementById("reverse_content").innerHTML = data;
    } else  {
        document.getElementById("reverse_content").innerHTML = "Please wait...updating";
    }
}

“unknown runtime error” on this line:

document.getElementById("reverse_content").innerHTML = data;

var data is passed as:

"

OTC

Melasma condition. OTC description. "

If I change that one line above to this:

document.getElementById("reverse_content").innerHTML = 'test';

it works. Or if I change it so var data returns ‘return test’ then it works. I found out that simply adding ANY html tag in the var data to something like:

'

test

'

causes this error.

  • Share/Save/Bookmark

Jquery Ajax .load not working

Here is some code using JQuery’s .load:

The following code is not correctly displaying the information though:

 function revDescr(condition_id, rev_cat_id) {
    this.condition_id = condition_id;
    this.rev_cat_id = rev_cat_id;

    var pars = 'condition_id='+this.condition_id+'&rev_cat_id='+this.rev_cat_id; //used by jQuery
    $("#reverse_content").load("updateRevDescrSi.php?"+pars);
 }

Here is the comparable Ajax code using regular javascript (i.e. not using JQuery):

The following code is working and the information is properly displayed:

function revDescr(condition_id, rev_cat_id) {
    this.condition_id = condition_id;
    this.rev_cat_id = rev_cat_id;

    //update the reverse entry description
    xmlhttp10=GetXmlHttpObject(); //if xmlhttp object not created
    if (xmlhttp10==null) {
        alert ("Browser does not support HTTP Request");
        return;
    }

    var url="./include_ajax/updateRevDescrSi.php";
    url=url+"?condition_id="+this.condition_id;
    url=url+"&rev_cat_id="+this.rev_cat_id;
    url=url+"&sid="+Math.random();
    xmlhttp10.open("GET",url,true);
    xmlhttp10.onreadystatechange=stateChangedRevDescr;

    xmlhttp10.send(null);
}

function stateChangedRevDescr() {
    if (xmlhttp10.readyState==4) {
        var data = xmlhttp10.responseText;
        document.getElementById("reverse_content").innerHTML = data;
    } else  {
        document.getElementById("reverse_content").innerHTML = "Please wait...updating";
    }
}
  • Share/Save/Bookmark

Multiple DID phone numbers through Asterisk PBX system

I’d like to set up multiple DID phone numbers and then have them go through an Asterisk PBX system and then the calls should end up to a single PSTN or VOIP phone line. If the PSTN or VOIP phone line is busy then I’d like it to go to voicemail.

DID phone numbers channeled through an Asterisk PBX system to a single PSTN or VOIP phone line diagram

  • Share/Save/Bookmark

Skype Business Call Forwarding: Multiple People / Members

I’m wondering how to set up call forwarding via the Business Control Panel. I posted this problem on my blog and have some snapshots on this page:
http://blog.tutorialref.com/skype/skype-call-forwarding-161.html

I took a snapshot here of the ‘People’ I set up in the Business Control Panel.

Skype Business Control Panel - People profiles

I still have to sign up for the subscription.

I notice that on this page:
http://www.skype.com/business/features/calling/
it states:
“…To turn on call forwarding, go to Tools > Options > Calls > Call forwarding (in Windows) or Skype > Preferences > Calls (in Mac)…”

But the question is if I have multiple ‘People’ then how would I call forward all of these ‘People’ to one Boston USA number?

Do I need an Asterisk PBX or SIP PBX? I’m not quite certain what is a SIP PBX.

  • Share/Save/Bookmark