Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem inserting rows Fusiontable #73

Closed
mateisilviu opened this issue Jan 30, 2014 · 6 comments
Closed

Problem inserting rows Fusiontable #73

mateisilviu opened this issue Jan 30, 2014 · 6 comments
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@mateisilviu
Copy link

Hello, I have a problem when I want to insert a row into kml type column (text > 650 characters) .

$local_kml="&ltMultiGeometry&gt&ltPoint&gt&ltcoordinates&gt24.140480,44.135342,0.0&lt/coordinates&gt&lt/Point&gt&ltLineString&gt&ltextrude&gt1&lt/extrude&gt&lttessellate&gt1&lt/tessellate&gt&ltcoordinates&gt24.140480,44.135342,0.0 24.126301,44.144180,0.0 24.115210,44.151180,0.0 24.114630,44.151489,0.0 24.114120,44.151699,0.0 24.112841,44.152069,0.0 24.107710,44.153358,0.0 24.105780,44.153809,0.0 24.102489,44.154678,0.0 24.101170,44.155102,0.0 24.100401,44.155399,0.0 24.097790,44.156681,0.0 24.097340,44.156818,0.0 24.095270,44.157291,0.0 24.094919,44.157410,0.0 24.090691,44.159679,0.0 24.087879,44.160992,0.0 24.085251,44.161980,0.0 24.080259,44.163780,0.0 24.054230,44.172298,0.0 24.042780,44.176102,0.0 &lt/coordinates&gt&lt/LineString&gt&lt/MultiGeometry&gt";
$insertQuery = "insert into 1_in5SzLPuEV-MnS_Eq1vf2D4ICJJI4wR7bQ5hOo (kml,dn,km_start,km_end,text,iconName,lastUpdate) values ('{$local_kml}','test4','{$km_start }','{$km_end}','{$cauza}','{$snowflake_simple}',1)";
$ftclient=ConnectFusion($client);
var_dump($ftclient->query->sql($insertQuery));

Warning: file_get_contents(compress.zlib://https://www.googleapis.com/fusiontables/v1/query): failed to open stream: operation failed in .../Google/IO/Stream.php on line 115

Fatal error: Uncaught exception 'Google_IO_Exception' with message 'HTTP Error: Unable to connect' in .../Google/IO/Stream.php:118 Stack trace: #0 .../Google/Http/REST.php(42): Google_IO_Stream->makeRequest(Object(Google_Http_Request)) #1 .../Google/Client.php(487): Google_Http_REST::execute(Object(Google_Client), Object(Google_Http_Request)) #2 .../Google/Service/Resource.php(195): Google_Client->execute(Object(Google_Http_Request)) #3 /.../Google/Service/Fusiontables.php(682): Google_Service_Resource->call('sql', Array, 'Google_Service_...') #4 /../my.php(113): Google_Service_Fusiontables_Query_Resource->sql('insert into 1_i...') #5 .../my.php(59): test(Object(Google_ in ../Google/IO/Stream.php on line 118

It works if I remove some coordonates from $local_kml.

@ianbarber
Copy link
Contributor

Can you confirm that this works in other API clients or via the API explorer - e.g. that it is an issue with the library rather than with the API (we can't help on the API itself unfortunately!)

@mateisilviu
Copy link
Author

If my variable $local_kml has < 650 characters , let's say 500. The script works and the row is inserted.

@silvolu
Copy link
Contributor

silvolu commented Feb 1, 2014

@mateisilviu if you try the same query on the Google API Explorer, does it work?

@mateisilviu
Copy link
Author

It works on Google API Explorer.

@silvolu silvolu self-assigned this Mar 25, 2014
@silvolu
Copy link
Contributor

silvolu commented Mar 25, 2014

@mateisilviu could you send me a gist containing a complete example that I can run to test your issue?

@ianbarber ianbarber added the bug label Jul 1, 2014
@ianbarber
Copy link
Contributor

I'm going to close this as I've not got enough experience with fusion tables to recreate the issue. If someone can reproduce it and has a minimal code sample, we can look into it further though.

@yoshi-automation yoshi-automation added triage me I really want to be triaged. 🚨 This issue needs some love. labels Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants