|
-
Feb 8th, 2007, 05:08 PM
#1
Thread Starter
Frenzied Member
Running Quires through php
Ok i have a excel form that connects to a database and querys it. And brings back the values into the excel form.
Is there a way to just connect via the php script? and not use excel.
Question 2, I use Excel to run Macros on a emulated termal program that uses Extra program.
Is there a way i can run the macro with php, and display the infomation in php?
Or is there a way i can, in php, click a button and have it execute the query in excel, and then save the file, and say "done" on the screen?
-
Feb 9th, 2007, 03:01 AM
#2
Re: Running Quires through php
#1. it all depends on what type of database you're using -- but generally, of course you could execute the queries using php..
#2a. it depends what your macros do. you can't run excel macros through php, but you could still execute similar commands via php with the data retrieved from the database.
#2b. i doubt it. php can execute shell commands on the computer it is running from, but you can't get it to type stuff on your screen. php is a server sided language, it can't control anything outside of its environment (generally speaking).
in short; more information is needed.
-
Feb 9th, 2007, 04:31 AM
#3
Re: Running Quires through php
http://uk.php.net/COM
You can access Excel files via PHP much the same way as you can via VBA. I would not recommend doing this in a production environment however because each request will create an instance of Excel and will probably bring the system to a grinding halt. (also - these only work on windows).
If your database is an Access database, you can access it through and ODBC DSN. Again, Access does not cope well with concurrent connections and if you need to use data from Access I recommend you create a scheduled task that runs a PHP script every 15mins, grabbing or updating the relevant data. Best place to put it is in a mysql database. But sqlite, csv files and even XML files are way more efficient than Access.
-
Feb 9th, 2007, 11:05 AM
#4
Thread Starter
Frenzied Member
Re: Running Quires through php
If i can connect through excel, cant i just put that code from excel and add it to my php and connect to the db througt there?
-
Feb 9th, 2007, 02:39 PM
#5
Re: Running Quires through php
You are better querying the database, as the integrity of the data is likely to be more reliable.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|