Coder Social home page Coder Social logo

Comments (13)

mattbk avatar mattbk commented on July 20, 2024

Current db results table is named vcd_results (index.php line 79).

Based on this section, it looks like each respondent is recorded as a single row (ID by IP address REMOTE_ADDR), with three columns per phase. These three columns record the xcoordinate, ycoordinate, and response time of the respondent.

Columns referenced now:

  • result_host
  • result_date

Option 1:

Continue with this schema, and create a table in the database for each study (group of phases/scenes) with fields based on settings.json. This format is probably easier for RAs to analyze unless it is rewritten before download. This also means that the number of columns has to be hardcoded into index.php unless this section is changed.

Option 2:

Rebuild the schema as EVA so that a study can be modified by changing settings.json and without needing to run a db install script.

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

Fatal error: Call to a member function bind_param() on a non-object in /home/mattbkco/public_html/_projects/change/index.php on line 80

http://php.net/manual/en/mysqli-stmt.bind-param.php

I think this is because the table and columns don't exist.

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

image

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

That's better, now we get Could not execute query.

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

Got it to work in https://github.com/mattbk/changeblindnesstest/commit/839e7fe17f1d6b706a7b8b0015b3e95a55409257 (added the mysql error to die()), but phase names are still hardcoded.

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

First column of the database must be a generated UID.

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

First column of the database must be a generated UID.

That's exactly what it is (or, it works when you make it as such).

image

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

I know more. The way it is set up, the phase name needs to be in the field name as well.

  • _host
  • _date
  • _xcoordinate
  • _ycoordinate
  • _responsetime

are used in the code to pass to Twig.

screen shot 2015-10-29 at 6 00 21 pm

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

Adding all of this to an install script would probably be easier than going an EVA route right now.

Then if you run another study in the future, you specify a different table name and can use the same database. Would be best to install in a different folder with a different settings.json, though.

Should work for now, except for all the hardcoded phase names!

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

Hardcoded phase/scene names are only a problem in the part in index.php where they are written to db.

Since $_SESSION['results'] is a 2d array, can I use a nested foreach to build the insert query?

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

$_SESSION['results'['scene1'] is not built right. Should be $_SESSION['results'['phase1']. Scene1 is a value, not a key. Hmm.

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

I had result_host and result_date swapped in table. Fixed now.
image

from changeblindness.

mattbk avatar mattbk commented on July 20, 2024

Still needs to be done; does NOT need settings.json to be completed first.

Still need to do this first: #2

from changeblindness.

Related Issues (20)

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.