Re: Newbie and having to convert from idc/htx format
| From: | Frank Flynn | Date: | Sat, 27 Apr 2002 20:11:33 +0000 |
| Subject: | Re: Newbie and having to convert from idc/htx format | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-18851@lists.php.net to get a copy of this message | ||
On 4/27/02 1:52 AM, "php-db-digest-help@lists.php.net"
<php-db-digest-help@lists.php.net> wrote:
I'm not too familiar with idc/htx but I have used PHP, IIS, MS SQL and Linux
and had great results.
Here are some ideas that might help you:
-Try installing PHP on your current server (IIS) now you can convert
sections of your web site one at a time. Then you can migrate to a Linux /
Apache server with (hopefully) little trouble.
-Avoid the PHP's MSSQL_CONNECT, use ODBC instead. Just my experience but I
got ODBC to work easily, I never could get MSSQL calls to function properly.
Also if some day you decide to use another database vendors ODBC will still
work (perhaps with some tweaking).
-You can still use stored procs (I use them exactly they way you describe)
at minimum you can:
$my_sql = "my_procedure '$foo', '$bar'";
$my_result = odbc_exec($conn, $my_sql);
-The best documentation is:
http://www.php.net/ but I expect you've already fount
that.
-I don't remember what ODBC driver I'm using but it just worked and I've
never needed to mess with it since installing it.
Good luck,
Frank
> From: Robert Webb <rwebb@ropeguru.com>
> Date: Fri, 26 Apr 2002 10:23:11 -0400
> To: php-db@lists.php.net
> Subject: Newbie and having to convert from idc/htx format
>
> Ok, I have been somewhat tasked here to try and do a web conversion from
> the idc/htx format of Microsoft to a more portable format. I am looking
> and using php for my scripting. My current scripts are very simple. Here
> is my setup.
>
> Microsoft IIS using idc/htx frontend
> MSSQL backend database
> All sql queries, inserts, etc.. are handled as stored procedures.
> IDC files only pass data to the sql server via odbc.
>
> As you can see we have setup the sql server to handle all the processing
> of data. The web server only passes data put into the forms across to
> the sql server.
>
> Here are my questions.
>
> 1. What odbc would you recommend under Linux to connect to the mssql
> server.
>
> 2. Where would be a good place to go to get a feel on how I would write
> the code to pass the variable data over to the sql server.
>
> 3. Is this even easily obtainable. Or should I just start trying to
> re-write the entire site.
>
> Also I am including below a sample of what our idc file looks like.
>
> *Of course names have been changed to protect the guilty. ;-)
>
> Datasource: Contacts
> Template: view_entry.htx
> SQLStatement: DECLARE @typesearch varchar(50)
> +select @typesearch = '%R1%'
> +if @typesearch = 'name'
> +Begin
> +execute sp_corporate_wide_database_search '%name%', '%classification%'
> +End
> +if @typesearch = 'company'
> +begin
> +execute sp_main_company_search '%name%', '%classification%'
> +end
>
>
> I am on a tight schedule with this. Otherwise I would be only digging
> into any manual I could find first.
>
>
> Thanks,
> Robert
>