Hi,
I’m logging some data and normally the system writes the data to MySQL with a php file like that:
<?php
include("conect.php");
$link=Conection();
$Sql="insert into temp (temp1,temp2) values ('".$_GET["temp1"]."', '".$_GET["temp2"]."')";
mysql_query($Sql,$link);
header("Location: insert.php");
?>The question is how to insert it into the EE db that i can use it in the templates.
A channel with custom fields for 10 or more sensors and data every 5 minutes is to much i think.
I know how to access db fields from EE (query module).
But first i need to great tables (without custom fields) i can send my data to. And i need to know how to but data from outside into this fields to access the data later trough the query module.
I don’t know if i can just create some tables via phpMyAdmin in the EE db and if yes if they need to have some special format.
The query module won’t help you here as you can only perform SELECT statements which is why I pointed you to the database class which is what you will need.
You can create any additional tables in the expressionengine database you desire and no special format is required, however you will likely want to continue with whatever prefix your expressionengine database tables have i.e. exp_table_name
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.