Coder Social home page Coder Social logo

Comments (4)

jatorre avatar jatorre commented on June 29, 2024

Mike.

Do you want to take control over this repo?

I am the responsabile person and I dont really have time for it.

On Oct 8, 2012, at 7:03 PM, mikegiddens wrote:

I would suggest making these changes to the update function. Remove the lastID since this is an update statement and is not needed. Also adding single quotes to the values so that it does not crash on string values.

public function updateRow($table, $row_id, $data) {
$keys = implode(',', array_keys($data));
$values = implode('','', array_values($data));
$sql = "UPDATE $table SET ($keys) = ('$values') WHERE cartodb_id = $row_id;";

$sql .= "SELECT $table.cartodb_id as id, $table.* FROM $table ";

$sql .= "WHERE cartodb_id = currval('public." . $table . "_cartodb_id_seq');";

return $this->runSql($sql);

}

Reply to this email directly or view it on GitHub.

from cartodbclient-php.

mikegiddens avatar mikegiddens commented on June 29, 2024

Go ahead and put me on the list to edit this and I will make the changes.

from cartodbclient-php.

jatorre avatar jatorre commented on June 29, 2024

done
Javier de la Torre
@jatorre

Vizzuality / CartoDB
148 Lafayette St. PH, New York, 10013,USA
+1 347 320 7715

www.cartodb.com
Map, analyze and build applications with your data

On Oct 8, 2012, at 7:26 PM, mikegiddens wrote:

Go ahead and put me on the list to edit this and I will make the changes.


Reply to this email directly or view it on GitHub.

from cartodbclient-php.

jatorre avatar jatorre commented on June 29, 2024

Added.

On 08/10/2012, at 19:26, mikegiddens [email protected] wrote:

Go ahead and put me on the list to edit this and I will make the changes.


Reply to this email directly or view it on GitHub.

from cartodbclient-php.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.