Sponsored Content
Full Discussion: Question and answers
Top Forums UNIX for Dummies Questions & Answers Question and answers Post 302509946 by j_panky on Friday 1st of April 2011 06:10:37 AM
Old 04-01-2011
Question and answers

Hello All,
I need to prepare for interview.
Can any body help me with interview question and answers pls..

Regards,
Sam
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

I Need Some (help)answers Asap

can someone explain the meaning of the following shell commands: 1. who / wc -l 2. who / sort > user_names 3. cat students > new_students 4. current_day='date / cut -cl-3' i would also appreciated if you could tell me some things about the umask 1. what is a good umask value and why? 2.... (2 Replies)
Discussion started by: dakis
2 Replies

2. Solaris

expecting answers for these questions?

hi all plese clarify me in the following area. 1. What is the default NFS version in solaris 5.10. If it is 3, then why it asks me to specify "-o vers=3" keyword while i am mounting a share from a RHEL 5.1 Server? 2. Can someone give the link to download packages for accessing "ntfs"... (4 Replies)
Discussion started by: kingston
4 Replies

3. Homework & Coursework Questions

Need answers for these shell programs.....

1. Write a shell script to print the file names of all files having .txt extension of a given directory after converting to uppercase letters. The input (directory name) should be given as command line argument. The script will also check whether sufficient arguments are passed or not and whether... (2 Replies)
Discussion started by: sandeep148
2 Replies

4. UNIX for Dummies Questions & Answers

Need answers urgently!!

hello guys!! need 1 favour from u all.. Can u jst tell me the answers for these ques?? 1. ls - l _____ : command to return all files that end with single digit and those with TXT extension 2. ls -l report* _______ : command to return all files that start with the word RPT except those with LOG... (1 Reply)
Discussion started by: Gan_7
1 Replies

5. UNIX for Beginners Questions & Answers

Answers for few objective questions.

Hi Unix geniuses, I need your help for the answers of few objective Q&A. i dont know if my answers are correct or not. So i really need your help to provide the answers which will help me in unix programming. (1 Reply)
Discussion started by: Vivekit82
1 Replies

6. Programming

Always giving the answers as 1

Hi, I have wrote a python program to sum the numbers in a list.However its giving answer one. Please advise. MyList = Number = int(input("Please enter number:")) for i in range(1, Number + 1): value = int(input("Enter Numbers %d:" %i)) MyList.append(value) total =... (3 Replies)
Discussion started by: nag_sathi
3 Replies
PDO.PREPARE(3)								 1							    PDO.PREPARE(3)

PDO
::prepare - Prepares a statement for execution and returns a statement object SYNOPSIS
public PDOStatement PDO::prepare (string $statement, [array $driver_options = array()]) DESCRIPTION
Prepares an SQL statement to be executed by the PDOStatement.execute(3) method. The SQL statement can contain zero or more named (:name) or question mark (?) parameter markers for which real values will be substituted when the statement is executed. You cannot use both named and question mark parameter markers within the same SQL statement; pick one or the other parameter style. Use these parameters to bind any user-input, do not include the user-input directly in the query. You must include a unique parameter marker for each value you wish to pass in to the statement when you call PDOStatement.execute(3). You cannot use a named parameter marker of the same name more than once in a prepared statement, unless emulation mode is on. Note Parameter markers can represent a complete data literal only. Neither part of literal, nor keyword, nor identifier, nor whatever arbitrary query part can be bound using parameters. For example, you cannot bind multiple values to a single parameter in the IN() clause of an SQL statement. Calling PDO.prepare(3) and PDOStatement.execute(3) for statements that will be issued multiple times with different parameter values opti- mizes the performance of your application by allowing the driver to negotiate client and/or server side caching of the query plan and meta information, and helps to prevent SQL injection attacks by eliminating the need to manually quote the parameters. PDO will emulate prepared statements/bound parameters for drivers that do not natively support them, and can also rewrite named or ques- tion mark style parameter markers to something more appropriate, if the driver supports one style but not the other. PARAMETERS
o $statement - This must be a valid SQL statement for the target database server. o $driver_options - This array holds one or more key=>value pairs to set attribute values for the PDOStatement object that this method returns. You would most commonly use this to set the PDO::ATTR_CURSOR value to PDO::CURSOR_SCROLL to request a scrollable cursor. Some drivers have driver specific options that may be set at prepare-time. RETURN VALUES
If the database server successfully prepares the statement, PDO.prepare(3) returns a PDOStatement object. If the database server cannot successfully prepare the statement, PDO.prepare(3) returns FALSE or emits PDOException (depending on error handling). Note Emulated prepared statements does not communicate with the database server so PDO.prepare(3) does not check the statement. EXAMPLES
Example #1 Prepare an SQL statement with named parameters <?php /* Execute a prepared statement by passing an array of values */ $sql = 'SELECT name, colour, calories FROM fruit WHERE calories < :calories AND colour = :colour'; $sth = $dbh->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY)); $sth->execute(array(':calories' => 150, ':colour' => 'red')); $red = $sth->fetchAll(); $sth->execute(array(':calories' => 175, ':colour' => 'yellow')); $yellow = $sth->fetchAll(); ?> Example #2 Prepare an SQL statement with question mark parameters <?php /* Execute a prepared statement by passing an array of values */ $sth = $dbh->prepare('SELECT name, colour, calories FROM fruit WHERE calories < ? AND colour = ?'); $sth->execute(array(150, 'red')); $red = $sth->fetchAll(); $sth->execute(array(175, 'yellow')); $yellow = $sth->fetchAll(); ?> SEE ALSO
PDO.exec(3), PDO.query(3), PDOStatement.execute(3). PHP Documentation Group PDO.PREPARE(3)
All times are GMT -4. The time now is 08:33 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy