I have been a student at Hendrix Institute for about a year now. My term is comming to an end by the end of december. I have learned varios computer programs for web development that include Flash 5 and Dreamweaver. Actionscripting, Javascript and Database development with Access was all... (4 Replies)
All,
Have an AMD-K6/2 PC, 20G.Hd along with RH7.2.
Wanting to know what I should do in terms of setup (workstation/server) and then what I can do with it?
I'd like to learn a DBMS and SQL - can I do this using RedHat?
Any suggestions with how I can use/ what I can do with this appreciated. (3 Replies)
The current backup procedure we using a tar command in linux.
The files are stored in one partition in different folders. The docs stores in day wise folders like ex: /usr/data/xyz/20050129, /usr/data/xyz/20050130 .............etc
We using tar & gzip command to take backup everyday. The backup... (3 Replies)
We run WebSphere and by default it wants to install everything under /usr. While I can understand the default (everyone has a /usr) I would like to move this over to a dedicated volume group called apps and then setup my lv's and fs's here. Our WebSphere Admin doesn't like this because apparently... (1 Reply)
Hi all,
I have worked on HP UNIX and now i have moved to SunSolaris which i never used to work.
I am more on programming side like shell and perl scripting.
So i want to know from you experts that i need to take care or changes which i code in sun solaris in compared to HP unix.
Suggestions... (1 Reply)
Hi,
I have written a script which calls a process which ends up in a reboot of the system. At the end of the reboot it prompts for login & i need to provide the login details. am not able to figure out hw to do this.
Doubt: will echoing login details after calling the process work?
for ex:... (1 Reply)
Hello there....i am a final year comp science student.......i am thinking of doing my project on unix platform......which one do u suggest?thanx in advance... (3 Replies)
I've been busy and fell behind on Sun/Oracle. Forgive me if too basic. I welcome brief, cryptic, or advanced replies. I also welcome noobie information since I may have no clue what's up at the moment.
Problem statement:
I inherited a computer to set up. I would rather not figure out 8 months... (1 Reply)
Hi guys, i'm undergoing a traning in solaris administration and i request if any one have an idea on the interview questions on solaris.
thank you. (3 Replies)
i=1
out=""
j=`expr 2 * $1`
while
do
out="$out"#""
echo $out
((i=i+1))
done
while
do
print ${out%?}
((i=i+1))
done
This script is throwing an error:
gurnish:/home/fnb/gurnish/saurabh/scripts> while1 3
expr: 0402-050 Syntax error.
# (6 Replies)
Discussion started by: targetshell
6 Replies
LEARN ABOUT PHP
mysqlnd_ms_query_is_select
MYSQLND_MS_QUERY_IS_SELECT(3) 1 MYSQLND_MS_QUERY_IS_SELECT(3)mysqlnd_ms_query_is_select - Find whether to send the query to the master, the slave or the last used MySQL serverSYNOPSIS
int mysqlnd_ms_query_is_select (string $query)
DESCRIPTION
Finds whether to send the query to the master, the slave or the last used MySQL server.
The plugins built-in read/write split mechanism will be used to analyze the query string to make a recommendation where to send the query.
The built-in read/write split mechanism is very basic and simple. The plugin will recommend sending all queries to the MySQL replication
master server but those which begin with SELECT, or begin with a SQL hint which enforces sending the query to a slave server. Due to the
basic but fast algorithm the plugin may propose to run some read-only statements such as SHOW TABLES on the replication master.
PARAMETERS
o $query
- Query string to test.
RETURN VALUES
A return value of MYSQLND_MS_QUERY_USE_MASTER indicates that the query should be send to the MySQL replication master server. The function
returns a value of MYSQLND_MS_QUERY_USE_SLAVE if the query can be run on a slave because it is considered read-only. A value of
MYSQLND_MS_QUERY_USE_LAST_USED is returned to recommend running the query on the last used server. This can either be a MySQL replication
master server or a MySQL replication slave server.
If read write splitting has been disabled by setting mysqlnd_ms.disable_rw_split, the function will always return
MYSQLND_MS_QUERY_USE_MASTER or MYSQLND_MS_QUERY_USE_LAST_USED.
EXAMPLES
Example #1
mysqlnd_ms_query_is_select(3) example
<?php
function is_select($query)
{
switch (mysqlnd_ms_query_is_select($query))
{
case MYSQLND_MS_QUERY_USE_MASTER:
printf("'%s' should be run on the master.
", $query);
break;
case MYSQLND_MS_QUERY_USE_SLAVE:
printf("'%s' should be run on a slave.
", $query);
break;
case MYSQLND_MS_QUERY_USE_LAST_USED:
printf("'%s' should be run on the server that has run the previous query
", $query);
break;
default:
printf("No suggestion where to run the '%s', fallback to master recommended
", $query);
break;
}
}
is_select("INSERT INTO test(id) VALUES (1)");
is_select("SELECT 1 FROM DUAL");
is_select("/*" . MYSQLND_MS_LAST_USED_SWITCH . "*/SELECT 2 FROM DUAL");
?>
The above example will output:
INSERT INTO test(id) VALUES (1) should be run on the master.
SELECT 1 FROM DUAL should be run on a slave.
/*ms=last_used*/SELECT 2 FROM DUAL should be run on the server that has run the previous query
SEE ALSO
Predefined Constants, user filter .Runtime configuration, mysqlnd_ms.disable_rw_split, mysqlnd_ms.enable.
PHP Documentation Group MYSQLND_MS_QUERY_IS_SELECT(3)