SQL query with variable

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

SQL query with variable

10 May 2018, 13:12

I have a few questions about the SQL lib Class_SQLiteDB.ahk

Any answers will be helpful, I also posted to the creator in the scripts forum

How would I go about storing a date in the database so later I can do queries from date A to date B

What data type do I use? How do I do this (obviously I can generate the current date using ahk formattime)

Also, how do I do a select query with a variable with in?

SQL := "SELECT Table4.title FROM Table4 WHERE Table4.yen = %variable%;"
User avatar
tank
Posts: 3122
Joined: 28 Sep 2013, 22:15
Location: CarrolltonTX
Contact:

Re: SQL query with variable

10 May 2018, 15:12

I will answer your only AHK question. the others are SQL DB questions

Code: Select all

SQL := "SELECT Table4.title FROM Table4 WHERE Table4.yen = '" . variable . "';"
We are troubled on every side‚ yet not distressed; we are perplexed‚
but not in despair; Persecuted‚ but not forsaken; cast down‚ but not destroyed;
Telegram is the best way to reach me
https://t.me/ttnnkkrr
If you have forum suggestions please submit a
Check Out WebWriter
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: SQL query with variable

10 May 2018, 15:47

tank wrote:I will answer your only AHK question. the others are SQL DB questions

Code: Select all

SQL := "SELECT Table4.title FROM Table4 WHERE Table4.yen = '" . variable . "';"
Thank you, that worked

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Descolada, jameswrightesq, Joey5, mikeyww, RandomBoy, wpulford and 306 guests