Help get this topic noticed by sharing it on Twitter, Facebook, or email.

Inserting Data in the same Database

How can I add a new data to an existing database? im trying to create a voting extension and I wanna tally the votes they have but its always overwriting the data inside my database. Need help thanks :)
1 person has
this question
+1
Reply
  • Shlomo (Official Rep) June 30, 2014 10:27
    Hello Nico,

    It really depends on your architecture as to how you update the database. From your other ticket it appears you are using an SQL database; hence, I presume your question relates to the SQL end.

    I am happy to take a quick look for you if you provide the extension id and the file/line number where I can find the relevant code. However, if it's a pure SQL question perhaps post the question on an SQL forum.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • This reply was removed on 2014-07-01.
    see the change log
  • This reply was removed on 2014-07-01.
    see the change log
  • Hi Shlomo!

    I have already achieve what i am trying to do but the problem right now is that i have installed my extension to the other computers and what i have found out is that when i vote from my browser there are already data there but in the other browser from the other computer the data that are save from the database does not appear in the other browser. im currently using your local database. here is my extension. i hope you can help me on this. thanks. http://crossrider.com/apps/60191/ide
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned

  • Shlomo (Official Rep) July 01, 2014 06:16
    Hello Nico,

    The extension local database is specific to each installation and thus different for every installation and browser. Hence, what is saved in 1 browser will not be visible in another browser.

    To achieve your goal, you must save you data to a central resource such as a remove server, which I believe from your other ticket is your goal anyway :)

    Hence, setup a remote server that can accept GET/POST requests and update your extension to use appAPI.request to get/set comments from the remote server.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited kidding, amused, unsure, silly sad, anxious, confused, frustrated indifferent, undecided, unconcerned