php-windows Digest 14 Feb 2001 00:56:46 -0000 Issue 444

Topics (messages 5542 through 5559):

Re: assigning variable names on the fly, backed myself in to a corner
        5542 by: Darvin Andrioli
        5544 by: Asendorf, John
        5556 by: Ignatius Teo
        5557 by: Ignatius Teo

Re: How to save a file to a blob field?
        5543 by: Winston Valenzuela

Re: IIS Manipulation
        5545 by: Richard
        5546 by: David Harrison

pdflib put a image to a pdf file
        5547 by: Glenn Lindgren

mysql and phpmyadmin
        5548 by: Manuela
        5549 by: Tom Mathews
        5550 by: Ben Cairns
        5551 by: Phil Driscoll

PHP + COM
        5552 by: Dario Carnelutti
        5558 by: Alain Samoun

INSERT into MSSQL Server
        5553 by: Conover, Ryan
        5559 by: Frank M. Kromann

Re: [PHP] INSERT into MSSQL Server
        5554 by: Peter Houchin
        5555 by: Michael McGlothlin

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------


Ignatius wrote:

> try assigning it to another variable first:
> for ....
>       $tag = "$tag_num$i";
>       $type = "tag_type$i";
>       $sql = .... VALUES (..., $tag, $type....);

The last statement must be:
$sql = .... VALUES (..., $$tag, $$type....);

so you get the value of the variable named tag_type$i, otherwise yo get only the 
string "tag_type value of $i"

Darvin


> -----Original Message-----
> From: Asendorf, John [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, 13 February 2001 07:58
> To: Php-Windows (E-mail)
> Subject: [PHP-WIN] assigning variable names on the fly, 
> backed myself in
> to a corner
> 
> 
> I've written a little script that makes a form using a simple 
> for loop:
> 
> if ( $num_reg != "" )   {         //we're doing regulars
> 
>       for ( $i = 1 ; $i <= $num_reg ; $i++ )  {
>               echo "<tr><td>A<input type=\"hidden\" 
> name=\"tag_type${i}\"
> value=\"A\"></td>";
>               echo "<td><input type=\"text\" 
> name=\"tag_num${i}\"></td>";
>               echo "<td><input type=\"text\" name=\"tag_cost${i}\"
> value=\"\"></td>";
>               echo "<td><input type=\"text\"
> name=\"tag_late${i}\"></td></tr>\n";
>       }       
>       
>       $tag_count = $num_reg;
>       
> }
> 
> Now what I have is a number of variables that look something like this
> 
> $tag_type1, $tag_num1, $tag_cost1, $tag_late1, $tag_type2, $tag_num2,
> $tag_cost2, $tag_late2, etcetera... up to any number of tags...
> 
> now I'm trying to write a little for loop that drops this 
> information into a
> database after the POST:
> 
> for ( $i=1 ; $i <= $tag_count ; $i++ ) {  //tag_count came 
> from the post
> (dl_post_3.php)
> 
>      $sql = "INSERT into cfull2.tbl_dl_tags (TAGID_NUM, 
> CUSTID_NUM, TAG_NO,
> TAG_YEAR, TYPE_CODE, COST, TYPE) VALUES ($CUSTID_NUM, 
> $tag_num$i, $tag_year,
> '$tag_type$i' , $tag_cost$i )";
> 
>      $stmt = OCIParse ( $connection , $sql );
> 
>      OCIExecute ( $stmt , OCI_DEFAULT );
>      OCICommit( $connection );
>      OCIFreeStatement ( $stmt );
> }
> 
> 
> This obviously doesn't work and I'm not really sure what to 
> do now.  Is this
> a case of variable variable names?  I don't quite get those either  :)
> 
> Thanks in advance all,
> 
> John
> 
> 
> ---------------------
> John Asendorf - [EMAIL PROTECTED]
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
> Ipsa scientia potestas est
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: 
> [EMAIL PROTECTED]
> 




That's the ticket.  Thanks a million!

---------------------
John Asendorf - [EMAIL PROTECTED]
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
Ipsa scientia potestas est


> -----Original Message-----
> From: Darvin Andrioli [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 13, 2001 6:52 AM
> To: 'Ignatius Teo'; 'Asendorf, John'; 'Php-Windows (E-mail)'
> Subject: RE: [PHP-WIN] assigning variable names on the fly, backed
> myself in to a corner
> 
> 
> Ignatius wrote:
> 
> > try assigning it to another variable first:
> > for ....
> >     $tag = "$tag_num$i";
> >     $type = "tag_type$i";
> >     $sql = .... VALUES (..., $tag, $type....);
> 
> The last statement must be:
> $sql = .... VALUES (..., $$tag, $$type....);
> 
> so you get the value of the variable named tag_type$i, 
> otherwise yo get only the string "tag_type value of $i"
> 
> Darvin
> 
> 
> > -----Original Message-----
> > From: Asendorf, John [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, 13 February 2001 07:58
> > To: Php-Windows (E-mail)
> > Subject: [PHP-WIN] assigning variable names on the fly, 
> > backed myself in
> > to a corner
> > 
> > 
> > I've written a little script that makes a form using a simple 
> > for loop:
> > 
> > if ( $num_reg != "" )   {         //we're doing regulars
> > 
> >     for ( $i = 1 ; $i <= $num_reg ; $i++ )  {
> >             echo "<tr><td>A<input type=\"hidden\" 
> > name=\"tag_type${i}\"
> > value=\"A\"></td>";
> >             echo "<td><input type=\"text\" 
> > name=\"tag_num${i}\"></td>";
> >             echo "<td><input type=\"text\" name=\"tag_cost${i}\"
> > value=\"\"></td>";
> >             echo "<td><input type=\"text\"
> > name=\"tag_late${i}\"></td></tr>\n";
> >     }       
> >     
> >     $tag_count = $num_reg;
> >     
> > }
> > 
> > Now what I have is a number of variables that look 
> something like this
> > 
> > $tag_type1, $tag_num1, $tag_cost1, $tag_late1, $tag_type2, 
> $tag_num2,
> > $tag_cost2, $tag_late2, etcetera... up to any number of tags...
> > 
> > now I'm trying to write a little for loop that drops this 
> > information into a
> > database after the POST:
> > 
> > for ( $i=1 ; $i <= $tag_count ; $i++ ) {  //tag_count came 
> > from the post
> > (dl_post_3.php)
> > 
> >      $sql = "INSERT into cfull2.tbl_dl_tags (TAGID_NUM, 
> > CUSTID_NUM, TAG_NO,
> > TAG_YEAR, TYPE_CODE, COST, TYPE) VALUES ($CUSTID_NUM, 
> > $tag_num$i, $tag_year,
> > '$tag_type$i' , $tag_cost$i )";
> > 
> >      $stmt = OCIParse ( $connection , $sql );
> > 
> >      OCIExecute ( $stmt , OCI_DEFAULT );
> >      OCICommit( $connection );
> >      OCIFreeStatement ( $stmt );
> > }
> > 
> > 
> > This obviously doesn't work and I'm not really sure what to 
> > do now.  Is this
> > a case of variable variable names?  I don't quite get those 
> either  :)
> > 
> > Thanks in advance all,
> > 
> > John
> > 
> > 
> > ---------------------
> > John Asendorf - [EMAIL PROTECTED]
> > Web Applications Developer
> > http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> > Licking County, Ohio, USA
> > 740-349-3631
> > Ipsa scientia potestas est
> > 
> > 
> > -- 
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: 
> > [EMAIL PROTECTED]
> > 
> 




T29wcy4ueWVwLiBUaGFua3MgZm9yIHBvaW50aW5nIHRoYXQgb3V0Li4udGhhdCdzIHdoYXQgSSBt
ZWFudC4NCg0KSWduYXRpdXMNCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9t
OiBEYXJ2aW4gQW5kcmlvbGkgW21haWx0bzpkYXJ2aW4uYW5kcmlvbGlAY2FyaWNlc2UuaXRdDQo+
IFNlbnQ6IFR1ZXNkYXksIDEzIEZlYnJ1YXJ5IDIwMDEgMjI6NTINCj4gVG86ICdJZ25hdGl1cyBU
ZW8nOyAnQXNlbmRvcmYsIEpvaG4nOyAnUGhwLVdpbmRvd3MgKEUtbWFpbCknDQo+IFN1YmplY3Q6
IFJFOiBbUEhQLVdJTl0gYXNzaWduaW5nIHZhcmlhYmxlIG5hbWVzIG9uIHRoZSBmbHksIGJhY2tl
ZA0KPiBteXNlbGYgaW4gdG8gYSBjb3JuZXINCj4gDQo+IA0KPiBJZ25hdGl1cyB3cm90ZToNCj4g
DQ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CB0aGUgbGlzdCBhZG1pbmlzdHJhdG9ycywgZS1tYWlsOiANCj4gPiA+
IHBocC1saXN0LWFkbWluQGxpc3RzLnBocC5uZXQNCj4gPiA+IA0KPiA+IA0KPiANCj4gLS0gDQo+
IFBIUCBXaW5kb3dzIE1haWxpbmcgTGlzdCAoaHR0cDovL3d3dy5waHAubmV0LykNCj4gVG8gdW5z
dWJzY3JpYmUsIGUtbWFpbDogcGhwLXdpbmRvd3MtdW5zdWJzY3JpYmVAbGlzdHMucGhwLm5ldA0K
PiBGb3IgYWRkaXRpb25hbCBjb21tYW5kcywgZS1tYWlsOiBwaHAtd2luZG93cy1oZWxwQGxpc3Rz
LnBocC5uZXQNCj4gVG8gY29udGFjdCB0aGUgbGlzdCBhZG1pbmlzdHJhdG9ycywgZS1tYWlsOiAN
Cj4gcGhwLWxpc3QtYWRtaW5AbGlzdHMucGhwLm5ldA0KPiA=





This is the error that appeared:

Warning: SQL error: [INTERSOLV][ODBC InterBase driver][InterBase]conversion
error from string "BLOB", SQL state S1000 in SQLExecDirect in
c:/homepages/message/post.php on line 7


> Easier to diagnose if you tell us what the error was?
>
> Winston Valenzuela wrote:
>
> > I'm using ODBC to connect to my Interbase 6 database. Using the code:
> >
> > $post_stmt = "Insert into
> > MSGTABLE(firstname,middlename,lastname,msg_subject,msgbody,remote_ip)
> > values('$fname','$mname','$lname','$subj','$mssg','$remote_ip')";
> >
> > and the msgbody field is a blob type. and the data came from a textarea
> > field. But i got an error using this insert statement.
> >
> > How can i do it without an error?
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


----------------------------------------------------------------------------
----


> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]






I'm not much of an NT expert, so forgive me if this is a silly question.
But if the regular internet user doesn't have rights, and I make a web page
to do these functions, how do I get at it via the internet as a different
user that does have rights?  Do you have to be sitting at the machine to
take advantage of the extension?

Thanks,
Rick

-----Original Message-----
From: David Harrison [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 12, 2001 9:26 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] IIS Manipulation


Richard,

I didn't test it but I would imagine that as long as your server is
configured correctly, the box (or site) IUSR account wouldn't have the
necessary priveledges to do anything chaotic. I didn't test that, so might
be worth testing.

If for some reason it does work (again I'd be surprised if it did), you
could probably set up something funky like a single site that has a .php
extension bound to a different php.exe that calls a different .ini file (if
this is possible under windows, under linux I'm sure you can just
o  -c<path>       Look for php.ini file in this directory) which has the
settings for the IIS stuff contained in that. This way you've only got one
site (which you can lock down with IP restrictions or whatever) that can
access the DLL.

--dave


----- Original Message -----
From: "Richard" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 13, 2001 12:36 AM
Subject: RE: [PHP-WIN] IIS Manipulation


> How are these functions controlled?  Like, if I install this dll, will
> anyone with a site on my server be able to use these functions?  Are there
> any restrictions as to how they can be used?
>
> Thanks,
> Rick
>
> -----Original Message-----
> From: David Harrison [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, February 11, 2001 1:24 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] IIS Manipulation
>
>
> With the absence of any ADSI interface for PHP (and a COM implementation
> that seems dodgy, at least for me and the others that have tried it), I'd
> sort of given up thinking about using PHP for IIS manipulation and had
> resigned myself to a fate of VBScript for anything I needed to do.
>
> I'd noticed there's a DLL that comes with the latest distribs of PHP
called
> php_iisfunc.dll, which I'd always wondered what it did. Whilst looking at
> the zend.com site today, I found a list of undocumented functions
> (http://www.zend.com/phpfunc/nodoku.php), which makes reference to these
> functions.
>
> Because noone has done it yet (unless I've missed it) I thought I'd just
> spam some quick information about some testing I did with them.
>
> ----------------
>
> string iis_GetScriptMap(string id, string virtualPath, string extension)
>
> Returns IIS script mappings for a site.
>
> eg:
>   echo iis_GetScriptMap(iis_GetServerByComment("srvName"), "", ".asp");
> returns:
>   .asp,F:\WINNT\System32\inetsrv\asp.dll,1,GET,HEAD,POST,TRACE
>
> ----------------
>
> int iis_AddServer(string Path, string Comment, string ServerIP, int
> ServerPort, string HostName, int ServerRights, int StartServer)
>
> Adds a server to the IIS Metabase with the supplied parameters.
>
> eg:
>   iis_AddServer("f:\\", "comment","130.102.1.1", 80,"hostname", 0,1);
>
> Creates a new server with a hostheader name "hostname". Returns the Server
> Instance ID for the created server.
>
> ----------------
>
> int iis_GetServerByComment(string comment);
> int iis_GetServerByPath(string path);
>
> Returns the server instance ID for the server with the comment (ie, the
name
> that appears in MMC). This ID can then be passed to some of the other
> functions (as done below).
>
> eg:
>   iis_GetServerByComment("Default Web Site");
>   iis_GetServerByPath("f:\inetpub\wwwroot");
> Returns:
>   Using 'Default Web Site' as the comment should return 1.
>
>
>
> ----------------
>
> int iis_StopServer(int serverID);
>
> Stops a particular server
>
> eg:
>   iis_StopServer("Default Web Site");
> Returns
>   1 on success, 0 on failure, I _think_ - however, I couldn't get this
> function to work.
>
> I'm not sure of the difference between this one and iis_StopService. I
would
> have thought StopService would stop the whole webservice, but it seems to
> take a serverID parameter. Shrug.
>
> ----------------
>
> int iis_StartServer(int serverID);
>
> Starts a particular server
>
> eg:
>   iis_StartServer("Default Web Site");
> Returns
>   1 on success, 0 on failure, I _think_. That is, the function returned 1
on
> one site that I'd stopped, and successfully restarted it. However, I
> couldn't make it restart the 'Default Web Site', yet it still returned 1.
> Shrug.
>
> ----------------
>
> int iis_RemoveServer(int serverID);
>
> eg:
>   iis_RemoveServer(iis_GetServerByComment("comment"));
> Returns
>   1 on success, -602 on failure (if I made up a fake comment)
>
> ----------------
>
> There are also the following, which return values that I didn't try to
> figure out (laziness), and take a 2nd parameter (referred to in the source
> as string VirtualPath) that I also didn't figure out (also laziness):
>
> iis_getdirsecurity(iis_GetServerByComment("website"), "");
> iis_GetServerRight(iis_GetServerByComment("website"), "");
> iis_GetServiceState(iis_GetServerByComment("website"));
>
> Sorry about the poor documentation, but its better than what is on the PHP
> site :)
>
> I'm not sure how stable/reliable these are. I had a quick look through the
> source but I'm not familiar enough with the metabase functions that are
used
> to know whether or not its done in the most stable way. I know though that
> I've had enough problems with metabase corruption on servers that have
only
> ever been administered through MMC to be wary when trying 3rd party
products
> to do a similar thing.
>
> --dave
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]





> I'm not much of an NT expert, so forgive me if this is a silly question.
> But if the regular internet user doesn't have rights, and I make a web
page
> to do these functions, how do I get at it via the internet as a different
> user that does have rights?  Do you have to be sitting at the machine to
> take advantage of the extension?

Nope - you can remove access for the IUSR account from the directory which
contains the files. When you do this, you'll get a standard
username/password dialog asking for login details - you should be able to
use any user account (ie, administrator) to get into that directory. When
you do this, the pages are being executed with the userid of whatever you
use to login - so be careful :)

--dave





Hallo!
I got this problem, I can't insert a image to the pdf 
document. I useing " pdf_place_image
($pdfdoc, "test.gif", 100, 100, 1); "
Is it anybody got a tip..

Best regards.
//Glenn

................................................................
   80.000 svenskar har nu gratis e-post på Sverige.nu!

   http://www.sverige.nu




I have installed mysql on my remote host and phpmyadmin on my local machine,
(which seems good, reading your posts on this NG :-) )
If I try to open index.php I get the following error:

Warning: MySQL Connection Failed: Host '' is not allowed to connect to this
MySQL server in lib.inc.php on line 255
Error

What shoul I write in config.inc.php as host? Not the complete URL to mysql
(IE www.mysite.net/usr/local/mysql )?

Thank you very much in advance,
Manuela






Manuela.
I tried this for a while, and found that it was actually a problem at one of my
ISP's end that they were unable to resolve, so I gave up and installed
phpmyadmin on my remote site as well (its not very big if you pare down the
unwanted bits).
You may have the same problem

Tom

Manuela wrote:

> I have installed mysql on my remote host and phpmyadmin on my local machine,
> (which seems good, reading your posts on this NG :-) )
> If I try to open index.php I get the following error:
>
> Warning: MySQL Connection Failed: Host '' is not allowed to connect to this
> MySQL server in lib.inc.php on line 255
> Error
>
> What shoul I write in config.inc.php as host? Not the complete URL to mysql
> (IE www.mysite.net/usr/local/mysql )?
>
> Thank you very much in advance,
> Manuela
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




in your lib.inc.php
put localhost as the host value

-- Ben Cairns - Head Of Technical Operations
intasept.COM
Tel: 01332 365333
Fax: 01332 346010
E-Mail: [EMAIL PROTECTED]
Web: http://www.intasept.com

"MAKING sense of
the INFORMATION
TECHNOLOGY age
@ WORK......"





>What shoul I write in config.inc.php as host?
The name of the remote machine (eg whatever.mysite.net) or its IP address.
You also need to check in the mysql privilege tables that your own IP
address is allowed to talk to mysql. This may be tricky without phpmyadmin
running first though - you will probably have to ask your ISP to grant you
the appropriate privileges.

Cheers
--
Phil Driscoll
Dial Solutions
+44 (0)113 294 5112
http://www.dialsolutions.com
http://www.dtonline.org





Hi i have a problem with PHP using a dll that i have created

the dll have this structure
    class (PROCESS)
        object(CAT)
            void(FILTER)

then, when i do this:
$pro=new COM("ENGINE.PROCESS"); it works fine
if i print any property it works but when i try to use the void filter
it gives me a lot of errors

i'm trying this
$pro->CAT.FILTER(XXX);

and i have tried
$pro->CAT->FILTER(XXX);

but nothing works, can somebody help me...

thanks

Dario





I believe that the next PHP version will correct a lot of the COM bugs in
the current version.

Alain
On Tue, Feb 13, 2001 at 05:43:29PM -0400, Dario Carnelutti wrote:
> Hi i have a problem with PHP using a dll that i have created
> 
> the dll have this structure
>     class (PROCESS)
>         object(CAT)
>             void(FILTER)
> 
> then, when i do this:
> $pro=new COM("ENGINE.PROCESS"); it works fine
> if i print any property it works but when i try to use the void filter
> it gives me a lot of errors
> 
> i'm trying this
> $pro->CAT.FILTER(XXX);
> 
> and i have tried
> $pro->CAT->FILTER(XXX);
> 
> but nothing works, can somebody help me...
> 
> thanks
> 
> Dario
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]




I trying to insert some data into a MSSQL Server 7.0 database from Php. Some
of the data has various characters ', >  . How can I tell SQL Server to
treat these characters as part of the input.

Ryan Conover




It is only the ' charactor there has a "problem" you have to excape any special 
character before inserting.

the text Joe's should be inserted like this"

INSERT INTO table1 (int_field, char_field) VALUES (1, 'Joe''s')

A single quote is escaped by an extra single quote.

- Frank

>I trying to insert some data into a MSSQL Server 7.0 database from Php. Some
>of the data has various characters ', >  . How can I tell SQL Server to
>treat these characters as part of the input.
>
>Ryan Conover
>
>-- 
>PHP Windows Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>







in mysql i'd treat them as a char or varchar i would assume it would be the
same in MSSQL

-----Original Message-----
From: Conover, Ryan [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 14, 2001 9:32 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] INSERT into MSSQL Server


I trying to insert some data into a MSSQL Server 7.0 database from Php. Some
of the data has various characters ', >  . How can I tell SQL Server to
treat these characters as part of the input.

Ryan Conover

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]






Have you tried addslashes () on the input lines before the insert?

Conover, Ryan wrote:

> I trying to insert some data into a MSSQL Server 7.0 database from Php. Some
> of the data has various characters ', >  . How can I tell SQL Server to
> treat these characters as part of the input.
> 
> Ryan Conover
> 




Reply via email to