Go to advanced search

by dverleysen
Sun Jan 31, 2016 1:40 pm
Forum: Other programming languages
Topic: MySql question
Replies: 24
Views: 3260

Re: MySql question

This code works #!/usr/bin/python import MySQLdb import datetime db = MySQLdb.connect(host="localhost", user="tester", passwd="testpw", db="testdb") cur = db.cursor() cur.execute("SELECT c1, c5, c6 FROM t1 ;") for row in cur.fetchall(): print "Row number:", row[0] c1 = int(row[0]) + 1 print "Date:"...
by dverleysen
Sun Jan 31, 2016 12:48 pm
Forum: Other programming languages
Topic: MySql question
Replies: 24
Views: 3260

Re: MySql question

Paeryn wrote:Doesn't mysql want the date to be formatted as YYYY-MM-DD which probably isn't what python's %x gives,? Try

Code: Select all

datenow = time.strftime('%Y-%m-%d')
Thanks, did this already :)
I deleted the whole table, so i have to wait now for some clean data to try again.
by dverleysen
Sun Jan 31, 2016 11:29 am
Forum: Other programming languages
Topic: MySql question
Replies: 24
Views: 3260

Re: MySql question

If you're storing date and/or time values you should use a timestamp column. That will order by correctly. Thank you, I've changed the structure of the fields time and date time = time date = date But i will have to make some change to my Python code, to write a correct date en time stamp i've got ...
by dverleysen
Sun Jan 31, 2016 10:43 am
Forum: Other programming languages
Topic: MySql question
Replies: 24
Views: 3260

Re: MySql question

date = text
time = text
temp = varchar(10)
humd = varchar(10)

see attachment
by dverleysen
Sun Jan 31, 2016 10:12 am
Forum: Other programming languages
Topic: MySql question
Replies: 24
Views: 3260

MySql question

Hey, I present my temperatures values with Highcharts, it's very nice and easy. But i have a question about my mysql query Select time from value order by date desc, time desc limit 5 normally the limit is 288 = 24u overview (every 5 mins new value in database) When i run this query i got this resul...
by dverleysen
Sun Jan 24, 2016 3:54 pm
Forum: Python
Topic: Raspberry with IPCAM (Foscam)
Replies: 0
Views: 786

Raspberry with IPCAM (Foscam)

Hey,

I'm looking for an easy script to get a snapshot from my Foscam IP webcam.
I found already some scripts but without any result. :?
https://github.com/philipbl/snapshot
https://github.com/quatanium/foscam-python-lib

There are some other useful scripts available?
Thanks!
by dverleysen
Wed Jan 06, 2016 4:10 pm
Forum: Raspberry Pi OS
Topic: LINUX - Auto start VNC en mapsharing during startup
Replies: 4
Views: 507

Re: LINUX - Auto start VNC en mapsharing during startup

Thanks DirkS for the quick and useful answer!
by dverleysen
Wed Jan 06, 2016 3:11 pm
Forum: Raspberry Pi OS
Topic: LINUX - Auto start VNC en mapsharing during startup
Replies: 4
Views: 507

Re: LINUX - Auto start VNC en mapsharing during startup

uname -mrs
=
Linux 4.1.13-v7+ armv7l

lsb_release -a
=
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 8.0 (jessie)
Release: 8.0
Codename: jessie
by dverleysen
Wed Jan 06, 2016 2:14 pm
Forum: Raspberry Pi OS
Topic: LINUX - Auto start VNC en mapsharing during startup
Replies: 4
Views: 507

LINUX - Auto start VNC en mapsharing during startup

Hi, I've a question about auto starting VNC and map mounting during startup. I've already took a look at the rc.local file and added some stuff but it doesn't work. sudo mount.cifs //192.168.0.2/surveillance/ /home/pi/snapshot/ -o user=xxxxx,password=xxxxx vncserver :1 -geometry 1280x960 -depth 24 A...

Go to advanced search