IT. Expert System.

PHP

Escape special characters for use in a query


ingres_escape_string

(PECL ingres >= 2.1.0)

ingres_escape_stringEscape special characters for use in a query

Description

string ingres_escape_string ( resource $link , string $source_string )

ingres_escape_string() is used to escape certain characters within a string before it is sent to the database server.

Parameters

link

The connection link identifier

source_string

The source string to be parsed

Return Values

Returns a string containing the escaped data.

Examples

Example #1 Escape special characters for use in a query

<?php
$link 
ingres_connect($database$user$password);

$last_name "O'Connor";

$sql sprintf("select * from user_profile where up_last = '%s'"ingres_escape_string$link$last_name));

$result ingres_query($link$sql);

while (
$user ingres_fetch_object($result))
{
  echo 
$user->up_first '<BR/>';
}

ingres_commit($link);

ingres_close($link);

?>

See Also



Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 144 / 158679497. Delta: 0.00370 с