Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Using the fixed length field file called famous.dat make a one-line Unix command - using pipe(s) - to display an alphabetical list of the last and first names in upper case of the last 8 people in the file.
* I solved the answer*. But I'm only trying to display the first 2 columns, the first name and last name. Can anyone help with what I need to add . Thanks 2. Relevant commands, code, scripts, algorithms:
3. The attempts at a solution (include all code and scripts):
*Below is the result I got*, but I only want the Last Name and First Name Column only, any help will be appreciated, thanks
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
City College . San Francisco CA USA Instructor Conner
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
Moderator's Comments:
Please view this code tag video for how to use code tags when posting code and data.
Last edited by vbe; 09-18-2012 at 10:53 AM..
Reason: code tags...
hi All
I have a scritp running which connects to a local host and then gets a value from a field and then ftp that value to antoher server. It is running fine, and from crontab it gives the output to a file, the problem is sometime it doesnt run but if i check the output file it does not show one... (0 Replies)
Hi all,
I have a network drive that has a directory named "music". In music I have a ton of folders of artists then albums then songs. I wanted to print out all of the songs ordered by artists then albums.
I was trying:
*********************
du -ka | sort
*********************
... (4 Replies)
Hi guys (& ladies) :)
I'm looking for some good linux distribution to use on my new project.
The project looks like this:
- tiny computer (ethernet, D-sub, usb, etc),
- big-screen monitor (min 40'').
All it has to do is to display some .swf advertisement in fullscreen mode. (plus some extra... (4 Replies)
Hi everyone,
I have UNIX this semester and I am just getting started with the commands. An interesting question came up while discussing the head and tail commands.
Suppose that I have text file with the following data in the following format-:
NAME ROLL MARKS
Sam 05 ... (2 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
You are given a ANSI text file (a.txt) in the following format and with the following contents-:
NAME ROLL... (7 Replies)
Hi Team,
Not getting the file output inside my email which i am sending from unix box. . Please refer the below code :
#!/bin/sh
{
sleep 5
echo ehlo 10.56.185.13
sleep 3
echo mail from: oraairtel@CNDBMUREAPZP02.localdomain
sleep 3
echo rcpt to: saurabhtripathi@anniksystems.com... (1 Reply)
Hi All,
I want to send the csv to an email address.
I have tried the below two approaches.
Approach1: Got error -ksh: uuencode: not found
$ uuencode test_file.csv test_file.csv | mailx -s "Attaching test" msdc.kiran@gmail.com </usr/home/test_file.csv
-ksh: uuencode: not found
Approach2:... (6 Replies)
Hi Gurus,
I am SQL developer and new unix user.
I need to create some file and file content based on information in two files.
I have one file contains basic information below file1 and another exception file file2. the rule is if "zone' and "cd" in file1 exists in file2, then file name is... (13 Replies)
Greetings Experts,
I am on AIX using ksh; I am processing the input files and generating a awk_output.txt file using AWK. By reading that awk_output.txt file, I am building a output.html file which is cat and then fed to /usr/sbin/sendmail .When the shell script is triggered through command... (2 Replies)
Discussion started by: chill3chee
2 Replies
LEARN ABOUT PHP
mysqli_stmt_fetch
MYSQLI_STMT_FETCH(3) 1 MYSQLI_STMT_FETCH(3)mysqli_stmt::fetch - Fetch results from a prepared statement into the bound variables
Object oriented style
SYNOPSIS
bool mysqli_stmt::fetch (void )
DESCRIPTION
Procedural style
bool mysqli_stmt_fetch (mysqli_stmt $stmt)
Fetch the result from a prepared statement into the variables bound by mysqli_stmt_bind_result(3).
Note
Note that all columns must be bound by the application before calling mysqli_stmt_fetch(3).
Note
Data are transferred unbuffered without calling mysqli_stmt_store_result(3) which can decrease performance (but reduces memory
cost).
PARAMETERS
o $
stmt -Procedural style only: A statement identifier returned by mysqli_stmt_init(3).
RETURN VALUES
Return Values
+------+---------------------------------------------------+
|Value | |
| | |
| | Description |
| | |
+------+---------------------------------------------------+
| | |
|TRUE | |
| | |
| | Success. Data has been fetched |
| | |
| | |
|FALSE | |
| | |
| | Error occurred |
| | |
| | |
|NULL | |
| | |
| | No more rows/data exists or data truncation |
| | occurred |
| | |
+------+---------------------------------------------------+
EXAMPLES
Example #1
Object oriented style
<?php
$mysqli = new mysqli("localhost", "my_user", "my_password", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s
", mysqli_connect_error());
exit();
}
$query = "SELECT Name, CountryCode FROM City ORDER by ID DESC LIMIT 150,5";
if ($stmt = $mysqli->prepare($query)) {
/* execute statement */
$stmt->execute();
/* bind result variables */
$stmt->bind_result($name, $code);
/* fetch values */
while ($stmt->fetch()) {
printf ("%s (%s)
", $name, $code);
}
/* close statement */
$stmt->close();
}
/* close connection */
$mysqli->close();
?>
Example #2
Procedural style
<?php
$link = mysqli_connect("localhost", "my_user", "my_password", "world");
/* check connection */
if (mysqli_connect_errno()) {
printf("Connect failed: %s
", mysqli_connect_error());
exit();
}
$query = "SELECT Name, CountryCode FROM City ORDER by ID DESC LIMIT 150,5";
if ($stmt = mysqli_prepare($link, $query)) {
/* execute statement */
mysqli_stmt_execute($stmt);
/* bind result variables */
mysqli_stmt_bind_result($stmt, $name, $code);
/* fetch values */
while (mysqli_stmt_fetch($stmt)) {
printf ("%s (%s)
", $name, $code);
}
/* close statement */
mysqli_stmt_close($stmt);
}
/* close connection */
mysqli_close($link);
?>
The above examples will output:
Rockford (USA)
Tallahassee (USA)
Salinas (USA)
Santa Clarita (USA)
Springfield (USA)
SEE ALSO mysqli_prepare(3), mysqli_stmt_errno(3), mysqli_stmt_error(3), mysqli_stmt_bind_result(3).
PHP Documentation Group MYSQLI_STMT_FETCH(3)