Hello All,
I have a .csv file and I have to delete the selcted records stored in a vairable
e.g
echo $lname
7 88 91 94 97 100 103 106
I dont know how to pass the variable name to "sed" for deleting the $lname from a file
can any one help as this is very urgent.
$lname is changing the... (3 Replies)
Hi
I have a file & always I need to remove or delete last 2 lines from that file. So in a file if I have 10 lines then it should return me first 8 lines.
Can someone help me? (4 Replies)
I have a file with 65 sets of 35 coordinates, and would like to isolate these coordinates so that I can easily copy the coordinates to another file. The problem is, I've got a 9 line header before each set of coordinates (so each set is 44 lines long). There are a zillion threads out there about... (3 Replies)
We have a server that logs transactions to a file. I want to write a script that will delete the first 50 lines of the file daily without renameing the file or moving the file. (8 Replies)
I have a text file with two coulmn
first column is just used in to show the line number, these line number are not there in the real file.
I want to delete the line 16(in this file) here, even tough there is no data inside it . this empty line is causing me a problem by throwing me garbage... (12 Replies)
i have something like this in a file called mysqldump.sql
--
-- Table structure for table `Table11`
--
DROP TABLE IF EXISTS `Table11`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Table11` (
`id` int(11) NOT NULL... (14 Replies)
Hi all,
I have a file with some number of lines. I need to add certain number of lines from another file which may vary according to the user's input and to it.
eg
code:
I/P
file 1
apps/file/xyz
apps/file/abc
apps/file/def
file 2
progs/file/xyz
... (2 Replies)
Hi,
I have a file containing many records delimited by pipe (|).
Each record should contain 17 columnns/fields. there are some fields having fields less than 17.So i am extracting those records to a file using the below command
awk 'BEGIN {FS="|"} NF !=17 {print}' feedfile.txt... (8 Replies)
Discussion started by: TomG
8 Replies
LEARN ABOUT PHP
mysqli_options
MYSQLI_OPTIONS(3) 1 MYSQLI_OPTIONS(3)mysqli::options - Set options
Object oriented style
SYNOPSIS
bool mysqli::options (int $option, mixed $value)
DESCRIPTION
Procedural style
bool mysqli_options (mysqli $link, int $option, mixed $value)
Used to set extra connect options and affect behavior for a connection.
This function may be called multiple times to set several options.
mysqli_options(3) should be called after mysqli_init(3) and before mysqli_real_connect(3).
PARAMETERS
o $
link -Procedural style only: A link identifier returned by mysqli_connect(3) or mysqli_init(3)
o $option
- The option that you want to set. It can be one of the following values:
Valid options
+---------------------------+---------------------------------------------------+
| Name | |
| | |
| | Description |
| | |
+---------------------------+---------------------------------------------------+
| | |
|MYSQLI_OPT_CONNECT_TIMEOUT | |
| | |
| | connection timeout in seconds (supported on Win- |
| | dows with TCP/IP since PHP 5.3.1) |
| | |
| | |
| MYSQLI_OPT_LOCAL_INFILE | |
| | |
| | enable/disable use of LOAD LOCAL INFILE |
| | |
| | |
| MYSQLI_INIT_COMMAND | |
| | |
| | command to execute after when connecting to MySQL |
| | server |
| | |
| | |
| MYSQLI_READ_DEFAULT_FILE | |
| | |
| | Read options from named option file instead of |
| | my.cnf |
| | |
| | |
|MYSQLI_READ_DEFAULT_GROUP | |
| | |
| | Read options from the named group from my.cnf or |
| | the file specified with MYSQL_READ_DEFAULT_FILE. |
| | |
| | |
| MYSQLI_SERVER_PUBLIC_KEY | |
| | |
| | RSA public key file used with the SHA-256 based |
| | authentication. |
| | |
+---------------------------+---------------------------------------------------+
o $value
- The value for the option.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
CHANGELOG
+--------+-------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+-------------------------------------------------+
| 5.5.0 | |
| | |
| | The MYSQLI_SERVER_PUBLIC_KEY option was added. |
| | |
+--------+-------------------------------------------------+
EXAMPLES
See mysqli_real_connect(3).
NOTES
Note
MySQLnd always assumes the server default charset. This charset is sent during connection hand-shake/authentication, which mysqlnd
will use.
Libmysqlclient uses the default charset set in the my.cnf or by an explicit call to mysqli_options(3) prior to calling
mysqli_real_connect(3), but after mysqli_init(3).
SEE ALSO mysqli_init(3), mysqli_real_connect(3).
PHP Documentation Group MYSQLI_OPTIONS(3)