Sponsored Content
Full Discussion: city wide connection
Top Forums UNIX for Dummies Questions & Answers city wide connection Post 302192150 by Sprellarinn on Tuesday 6th of May 2008 06:39:20 AM
Old 05-06-2008
Smells like homework to me.
 

4 More Discussions You Might Find Interesting

1. Solaris

Solaris 10 ftp connection problem (connection refused, connection timed out)

Hi everyone, I am hoping anyone of you could help me in this weird problem we have in 1 of our Solaris 10 servers. Lately, we have been having some ftp problems in this server. Though it can ping any server within the network, it seems that it can only ftp to a select few. For most servers, the... (4 Replies)
Discussion started by: labdakos
4 Replies

2. What is on Your Mind?

For China members:which city do you live?

hi guys: i am live in Changsha China , i am study here . which city do you live? (1 Reply)
Discussion started by: kingdream
1 Replies

3. UNIX for Dummies Questions & Answers

divide the file into multiple files based on the city name

Hi, I have a file abc.dat. It contains the fileds of empid, empname, empcity. each city contains 10 records. i want to create the city file and pass the same city records into the file. I don't know the city names. In unix using awk command how can we do? abc.dat: 1 john delhi 2... (2 Replies)
Discussion started by: raghukreddy.ab
2 Replies

4. What is on Your Mind?

For Indian Members: What City Do You Live?

A Tribute to India For our Indian members, please let us know in the poll what city you live (or work)? Mumbai (Bombay) Delhi Kolkata (Calcutta) Chennai (Madras) Bangalore Hyderabad Pune Ahmedabad Kanpur Surat Other (Please Tell Us in Post and Write in Poll, Thanks!) Don't Live in... (32 Replies)
Discussion started by: Neo
32 Replies
MAXDB_PREPARE(3)							 1							  MAXDB_PREPARE(3)

maxdb_prepare - Prepare an SQL statement for execution

       Procedural style

SYNOPSIS
resource maxdb_prepare (resource $link, string $query) DESCRIPTION
Object oriented style maxdb_stmt maxdb::prepare (string $query) maxdb_prepare(3) prepares the SQL query pointed to by the null-terminated string query, and returns a statement handle to be used for fur- ther operations on the statement. The query must consist of a single SQL statement. Note You should not add a terminating semicolon or g to the statement. The parameter $query can include one or more parameter markers in the SQL statement by embedding question mark ( ?) characters at the appropriate positions. Note The markers are legal only in certain places in SQL statements. For example, they are allowed in the VALUES() list of an INSERT statement (to specify column values for a row), or in a comparison with a column in a WHERE clause to specify a comparison value. However, they are not allowed for identifiers (such as table or column names), in the select list that names the columns to be returned by a SELECT statement), or to specify both operands of a binary operator such as the = equal sign. The latter restriction is necessary because it would be impossible to determine the parameter type. In general, parameters are legal only in Data Manipula- tion Languange (DML) statements, and not in Data Defination Language (DDL) statements. The parameter markers must be bound to application variables using maxdb_stmt_bind_param(3) and/or maxdb_stmt_bind_result(3) before exe- cuting the statement or fetching rows. RETURN VALUES
maxdb_prepare(3) returns a statement resource or FALSE if an error occurred. EXAMPLES
Example #1 Object oriented style <?php $maxdb = new maxdb("localhost", "MONA", "RED", "DEMODB"); /* check connection */ if (maxdb_connect_errno()) { printf("Connect failed: %s ", maxdb_connect_error()); exit(); } $city = "Rosemont"; /* create a prepared statement */ if ($stmt = $maxdb->prepare("SELECT state FROM hotel.city WHERE name=?")) { /* bind parameters for markers */ $stmt->bind_param("s", $city); /* execute query */ $stmt->execute(); /* bind result variables */ $stmt->bind_result($district); /* fetch value */ $stmt->fetch(); printf("%s is in district %s ", $city, $district); /* close statement */ $stmt->close(); } /* close connection */ $maxdb->close(); ?> Example #2 Procedural style <?php $link = maxdb_connect("localhost", "MONA", "RED", "DEMODB"); /* check connection */ if (maxdb_connect_errno()) { printf("Connect failed: %s ", maxdb_connect_error()); exit(); } $city = "Rosemont"; /* create a prepared statement */ if ($stmt = maxdb_prepare($link, "SELECT state FROM hotel.city WHERE name=?")) { /* bind parameters for markers */ maxdb_stmt_bind_param($stmt, "s", $city); /* execute query */ maxdb_stmt_execute($stmt); /* bind result variables */ maxdb_stmt_bind_result($stmt, $district); /* fetch value */ maxdb_stmt_fetch($stmt); printf("%s is in district %s ", $city, $district); /* close statement */ maxdb_stmt_close($stmt); } /* close connection */ maxdb_close($link); ?> The above example will output something similar to: Rosemont is in district IL SEE ALSO
maxdb_stmt_execute(3), maxdb_stmt_fetch(3), maxdb_stmt_bind_param(3), maxdb_stmt_bind_result(3), maxdb_stmt_close(3). PHP Documentation Group MAXDB_PREPARE(3)
All times are GMT -4. The time now is 12:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy