10-16-2017, 04:30 PM
@neverforget98 and @eer3,
I'm running into a similar issue. I've created another table in my userspice database and I'm trying to query data from it using the same format as the queries already in US.
In a previous section I'm generating a 32-digit random token ($project_token), along with name and description, which are inserted into an auto-incrementing table.
<pre></pre>
Now I'm trying to query the table to find my project by that token
<pre></pre>
When I print_r($project_get), this is the result:
print_r($project_get_id) just returns an empty "Array()"
I'm guessing from "[_errorB:private] => 1" that my sql query has generated an error, and returned no data.
So is it possible to use the built-in DB class/functions, or will that not work for data outside of the US installation?
I'm running into a similar issue. I've created another table in my userspice database and I'm trying to query data from it using the same format as the queries already in US.
In a previous section I'm generating a 32-digit random token ($project_token), along with name and description, which are inserted into an auto-incrementing table.
<pre>
Code:
$p_create=array('project-token'=>$project_token,'project-name'=>$_POST['project-name'],'project-description'=>$_POST['project-description']);
$db->insert('apps_project',$p_create);
Now I'm trying to query the table to find my project by that token
<pre>
Code:
$project_get = $db->query("SELECT * FROM apps_project WHERE token = ".$project_token.";");
$project_get_id = $project_get->results();
$this_id = $project_get_id->id;
When I print_r($project_get), this is the result:
Quote:DB Object ( [_pdoB:private] => PDO Object ( ) [_queryB:private] => PDOStatement Object ( [queryString] => SELECT * FROM apps_project WHERE token = oimevmvlaeccuspb0dtzq6y3xrig4jwt; ) [_errorB:private] => 1 [_resultsB:private] => Array ( ) [_resultsArrayB:private] => Array ( ) [_countB:private] => 1 [_lastIdB:private] => 20 [_queryCountB:private] => 9 )
print_r($project_get_id) just returns an empty "Array()"
I'm guessing from "[_errorB:private] => 1" that my sql query has generated an error, and returned no data.
So is it possible to use the built-in DB class/functions, or will that not work for data outside of the US installation?