Search code examples
phpgoogle-fusion-tables

what is the mistake in my code to work with google fusion tables?


i'm having problems with accessing my database from my server. i'm newbie in FT, so i'll describe all my actions.

1)At first i created table and made it public here it is: https://www.google.com/fusiontables/DataSource?snapid=S443329UwZ1

2)Then i downloaded a class to work with FT: http://code.google.com/p/fusion-tables-client-php/source/browse/

3)After that i knew an id of a table to use: 3406706

4)Tried to run modifyed file client_login_example.php:

    include('../clientlogin.php');
    include('../sql.php');
    include('../file.php');

    //get token
    $token = ClientLogin::getAuthToken('[email protected]', '253270514qQ');
    $ftclient = new FTClientLogin($token);

    //show all tables
    echo "<h1>hello</h1>";
    echo $ftclient->query(SQLBuilder::showTables());
    echo "<br />";

    //describe a table
    echo $ftclient->query(SQLBuilder::describeTable(3406706));
    echo "<br />";

    //select * from table
    echo $ftclient->query(SQLBuilder::select(3406706));
    echo "<br />";

But nothing is being displayed. What's the problem?


Solution

  • I don't know why but the official class for FT didn't work. But another class that I found over there:

    zend google fusion table update

    worked well.