php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32271 Can not deal with symbol such as ' or " or \
Submitted: 2005-03-11 03:32 UTC Modified: 2005-03-11 08:55 UTC
From: kangtk at 163 dot com Assigned:
Status: Not a bug Package: MSSQL related
PHP Version: 4.3.9 OS: windowXP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: kangtk at 163 dot com
New email:
PHP Version: OS:

 

 [2005-03-11 03:32 UTC] kangtk at 163 dot com
Description:
------------
I use PHP with sql server 2000 databse.

when I use like this:
$query = "select * from userinfo where Name='".$name."'";
$result = mssql_query($query,$db);

But if the $name has the symbol such as ' or " or \,It will be error.
Such as $name = " 'name" ";

How can I deal with this?

Thanks.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-11 08:42 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Even if you think it is not a bug, we often know better than you,
please consult the support channels first before even considering
to reopen this report.

Thank you for your interest in PHP.

.
 [2005-03-11 08:47 UTC] kangtk at 163 dot com
But can you tell me why it can be done well with mysql database, But cann't work well with sql server database?

I cann't find any help information about this, So I think it is a bug!

Do you think so?Thanks.
 [2005-03-11 08:55 UTC] derick@php.net
No, this is not a support forum. Seek support elsewhere - you can find information on where here: http://php.net/support.php, specifically the mailinglist.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 18:01:29 2024 UTC