Jump to content


gizmola

Member Since 06 May 2003
Offline Last Active Jul 21 2014 08:39 AM

Posts I've Made

In Topic: how backbone.js can help me?

21 July 2014 - 08:13 AM

gristoi is correct. Backbone is one of a number of javascript frameworks that have become popular in the last few years. There are now quite a number to choose from, which each have their own philosophy and approach. Backbone is one of the oldest, and takes a minimalist approach. Many of the newer competitors like Ember and Angular provide data binding/model functionality that can be quite compelling in comparison to Backbone.

Here's links to backbone and other competitors in this space:

http://backbonejs.org
http://knockoutjs.com
https://angularjs.org
http://emberjs.com
http://canjs.com

At this point, Angular, Ember and Backbone all have a good number of well known sites built using them. There's a nice surface level comparison page here: http://blog.codescho...s-best-for-your

In Topic: Problem in mysql indexing.

21 July 2014 - 07:44 AM

Just as I expected.

`begin_long_ip` varchar(20) NOT NULL,
`end_long_ip` varchar(20) NOT NULL,
You have defined these as strings. Then you want to do a comparison as integers.

EXPLAIN select * FROM ip2country WHERE 3084727327  BETWEEN begin_long_ip AND end_long_ip;
This works because mysql is changing the columns on the fly to integers.

The solution is.... convert the columns to UNSIGNED INT which is what they should be, since you're actually storing integer values in there.

You should see the indexes working as planned once you alter the table to type the columns correctly.

In Topic: timestamp vs timezones

19 July 2014 - 07:31 AM

@Psycho:


Well yes and no. It does store timestamps as UTC, but that is irrelevant if the server's timezone isn't UTC, since it will convert that internal value on the fly to whatever the timezone of the server is.

In Topic: Problem in mysql indexing.

19 July 2014 - 07:24 AM

Do a SHOW CREATE TABLE ip2country and copy and paste the results.

In Topic: SQL Server to MySQL (in-house server to remote Linode VPS)

16 July 2014 - 02:19 PM

Assuming these are simple scripts, sure that is another option. You could write your own custom replicator that pushes updates to a mysql server. Obviously you want to run this on the same machine that has the sql anywhere database, and you have the issue of what language you're going to use, but it's a good idea.

You basically would need to install the mysql client library on that machine, and you need some scripting language that will make things easy enough. Since you know php well, probably a custom php compile on that machine with inclusion for both client libraries would do the trick.

Of course you then have to figure out how you would know when a row has changed and requires update in the Linode MySQL db, but hopefully there is a timestamp of some sort that will make that obvious.

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com