@Guest2
Virgus?... Is that you?
MySQL Library functions
Started by
panofish
, Oct 20 2011 08:45 PM
66 replies to this topic
#16
-
Posted 14 November 2011 - 09:56 PM
This is super cool, any chance of a demo app to see it in action
Per your request I added a simple working demo (see first post).
#17
-
Posted 29 November 2011 - 08:18 PM
Hey, I noticed that you really haven't gotten a lot of feedback on your functions. I just wanted to let you know that I use them daily for a number of things.
I have my phone post to a php page I created when I receive texts, which in turn saves to a database after validating the token. On the other end, my computer is checking this database frequently. Upon finding a new text, it pops up on my screen with the text and sender info. I can also reply from my computer. All possible from this library and AHK (and a few other things on my phone end.)
That is one example of the many things I am using your library for. Just wanted to give you some credit for your awesome work!
Hope everyone else is finding them as useful as me.
I have my phone post to a php page I created when I receive texts, which in turn saves to a database after validating the token. On the other end, my computer is checking this database frequently. Upon finding a new text, it pops up on my screen with the text and sender info. I can also reply from my computer. All possible from this library and AHK (and a few other things on my phone end.)
That is one example of the many things I am using your library for. Just wanted to give you some credit for your awesome work!
Hope everyone else is finding them as useful as me.
#18
-
Posted 03 January 2012 - 06:55 PM
THANKS!
This library is reliable and easy to use. But, lately I've been working with IsNull to test and improve his OOP version of mysql library. I think his library is the future for mysql in AHK. It has recordset support, true objects, and supports both mysql and sqlite.
http://www.autohotke...der=asc&start=0
He still needs to fix some bugs and make some improvements in error handling, so for now, my library is the more stable recommendation.
This library is reliable and easy to use. But, lately I've been working with IsNull to test and improve his OOP version of mysql library. I think his library is the future for mysql in AHK. It has recordset support, true objects, and supports both mysql and sqlite.
http://www.autohotke...der=asc&start=0
He still needs to fix some bugs and make some improvements in error handling, so for now, my library is the more stable recommendation.
#19
-
Posted 03 January 2012 - 07:24 PM
Hi All
I just phoned my Service Provider, my database is located on a Web Server. While I was asking him about my specifics Host Name etc etc he mentioned to me that my project would be difficult because they do not authorize outside input or communication to their database. It has to come from their server (IP). So he said that he doubt if my script would be able to communicate with the DB! One thing he proposed was that my script could be on their server, then it could be possible.
What is your thoughts or impression on this could the script be hosted?
Tks
Bat
I just phoned my Service Provider, my database is located on a Web Server. While I was asking him about my specifics Host Name etc etc he mentioned to me that my project would be difficult because they do not authorize outside input or communication to their database. It has to come from their server (IP). So he said that he doubt if my script would be able to communicate with the DB! One thing he proposed was that my script could be on their server, then it could be possible.
What is your thoughts or impression on this could the script be hosted?
Tks
Bat
#20
-
Posted 14 August 2012 - 02:46 PM
@capbat: I believe web hosts provide a database specifically for dynamic web content (like these forums) and that you can very easily write a PHP or ASP script (that you invoke via HTTP) to forward queries to your online database.
#21
-
Posted 14 August 2012 - 04:27 PM
I guess it depends on what kind of app you are creating and who will be using it.
Are you building a web app or a stand alone app?
Does the app have many users?
Are the users located in 1 office or multiple offices on the same network or different networks?
Are the users anyone on the web?
What kind of application is it and what will it do?
Are you building a web app or a stand alone app?
Does the app have many users?
Are the users located in 1 office or multiple offices on the same network or different networks?
Are the users anyone on the web?
What kind of application is it and what will it do?
#22
-
Posted 14 August 2012 - 05:50 PM
I guess it depends on what kind of app you are creating and who will be using it.
Are you building a web app or a stand alone app?
Does the app have many users?
Are the users located in 1 office or multiple offices on the same network or different networks?
Are the users anyone on the web?
What kind of application is it and what will it do?
Hi tks for your reply.
@panafish
- No it is not a web app it is a Stand Alone.
- Single user (me)
- Just me Home.
- No
- An Ahk And I just want to scan my DB and look at a specific table and and a specific field and download a list of that table.
Tks.
Bat
#23
-
Posted 16 August 2012 - 01:00 AM
@capbat: I believe web hosts provide a database specifically for dynamic web content (like these forums) and that you can very easily write a PHP or ASP script (that you invoke via HTTP) to forward queries to your online database.
Tks VxE
No I am not in PHP or ASP. But if AHK could be a 'Web Content' ????
Ie: An AHK App on the web forwarding queries to my DB!!!
Bat
#24
-
Posted 16 August 2012 - 01:06 AM
Using this mysql library to connect to a remote server would be the same as trying to use the awesome product heidisql to connect and is possible, but depends on port 3306 being open.
This is a good article on this topic:
http://www.thegeekst...ent-connection/
This is a good article on this topic:
http://www.thegeekst...ent-connection/
#25
-
Posted 17 August 2012 - 01:10 PM
I'm trying to use the LIKE modifier in a SELECT query rather than the =. When running the query in phpmyadmin or the console, I get the expected result. When using the same query with your library in AHK, I get null result. Any idea what may be happening?
Thanks for such an awesome addition to AHK.
Thanks for such an awesome addition to AHK.
#26
-
Posted 20 September 2012 - 03:27 AM
I use 'like' all the time without any problem.
I'm guessing that you are forgetting that the 'like' wildcard will get confused with ahk's use of the percent symbol and you must escape with a backtick:
I'm guessing that you are forgetting that the 'like' wildcard will get confused with ahk's use of the percent symbol and you must escape with a backtick:
select count(*) from mytable where name like '%myvariable%`%'
#27
-
Posted 20 September 2012 - 04:39 AM
Thanks for the quick reply. That was it. However, I have since found a more reliable query that doesn't use LIKE. But there is one other strange thing:
When I first copy the library to the libraries folder in the AHK directory and then try to use the mysql library from within an AHK script, I get an error like the following:
"Cannot find libmysql.dll in C:\Users\CrasH\Apps\Roaming Data\the name of my script'
Sure enough, that folder comes into existence when I first try to run my script. Manually copying the dll file to the folder solves the issue, but it means the first run, every time, for every new script, does this. Thoughts?
When I first copy the library to the libraries folder in the AHK directory and then try to use the mysql library from within an AHK script, I get an error like the following:
"Cannot find libmysql.dll in C:\Users\CrasH\Apps\Roaming Data\the name of my script'
Sure enough, that folder comes into existence when I first try to run my script. Manually copying the dll file to the folder solves the issue, but it means the first run, every time, for every new script, does this. Thoughts?
#28
-
Posted 21 September 2012 - 12:13 AM
There is a line of code in the library function something like this:
It is intended to copy the libmysql.dll to a shared location when the user runs the program.
The programmer can run the program through the interpreter (run the ahk program), because the libmysql.dll should be in the local directory.
But, the end user will run a compiled version (.exe) of the application and the fileinstall command will embed the libmysql.dll inside the exe and place it in the users appdata folder at run time.
That is where the application looks for the dll.
Maybe you have a uniquely different setup on your machine, but I have run this on many other computers without a problem.
FileInstall, libmysql.dll, %libmysql%, 0
It is intended to copy the libmysql.dll to a shared location when the user runs the program.
The programmer can run the program through the interpreter (run the ahk program), because the libmysql.dll should be in the local directory.
But, the end user will run a compiled version (.exe) of the application and the fileinstall command will embed the libmysql.dll inside the exe and place it in the users appdata folder at run time.
That is where the application looks for the dll.
Maybe you have a uniquely different setup on your machine, but I have run this on many other computers without a problem.
#29
-
Posted 21 September 2012 - 02:01 AM
Thanks for the quick response. Understanding how that works will help me on my end. Given that I am using my system (and your library) to make a video game console, my setup may in fact be unique. I'll look into it.
#30
-
Posted 21 September 2012 - 05:02 AM