php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容

源代码在线查看: function.dbx-escape-string.html

软件大小: 3633 K
上传用户: fengkuangyidao
关键词: php PHP 文档 实际应用
下载地址: 免注册下载 普通下载 VIP

相关代码

												 				  Escape a string so it can safely be used in an sql-statement				  				 				 				 dbx_error				 dbx_fetch_row				 dbx Functions				 PHP Manual								 				  dbx_escape_string				  (PHP 4 >= 4.3.0, PHP 5 <= 5.0.5, PECL dbx:1.1.0)dbx_escape_string — 				   Escape a string so it can safely be used in an sql-statement				  								 				 				  Description				  				   string dbx_escape_string				    ( object $link_identifier				   , string $text				   )								  				   Escape the given string so that it can safely be used in an sql-statement.				  				 								 				  Parameters				  				   								    								     link_identifier												     								      				       The DBX link object returned by dbx_connect()				      				     								    								    								     text												     								      				       The string to escape.				      				     								    								   								  				 								 				  Return Values				  				   Returns the text, escaped where necessary (such as quotes, backslashes				   etc). On error, NULL is returned.				  				 								 				  Examples				  				   				    Example #1 dbx_escape_string() example				    								<?php$link   = dbx_connect(DBX_MYSQL, "localhost", "db", "username", "password")    or die("Could not connect");$text = dbx_escape_string($link, "It\'s quoted and backslashed (\\).");$result = dbx_query($link, "insert into tbl (txt) values ('" . $text . "')");if ($result == 0) {    echo dbx_error($link);}dbx_close($link);?>												    								   				  				 								 				  See Also				  				   				    dbx_query()				   				  				 												 dbx_error				 dbx_fetch_row				 dbx Functions				 PHP Manual											

相关资源