Results 1 to 5 of 5

Thread: Running Quires through php

  1. #1

    Thread Starter
    Frenzied Member joefox's Avatar
    Join Date
    Oct 2004
    Posts
    1,318

    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?

  2. #2
    PowerPoster
    Join Date
    Sep 2003
    Location
    Edmonton, AB, Canada
    Posts
    2,629

    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.

  3. #3
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    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.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

  4. #4

    Thread Starter
    Frenzied Member joefox's Avatar
    Join Date
    Oct 2004
    Posts
    1,318

    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?

  5. #5
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Running Quires through php

    You are better querying the database, as the integrity of the data is likely to be more reliable.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width