MSSQL_EXECUTE(3)MSSQL_EXECUTE(3)mssql_execute - Executes a stored procedure on a MS SQL server databaseSYNOPSIS
mixed mssql_execute (resource $stmt, [bool $skip_results = false])
DESCRIPTION
Executes a stored procedure on a MS SQL server database
PARAMETERS
o $stmt
- Statement handle obtained with mssql_init(3).
o $skip_results
- Whenever to skip the results or not.
EXAMPLES
Example #1
mssql_execute(3) example
<?php
// Create a new statement
$stmt = mssql_init('NewBlogEntry');
// Some data strings
$title = 'Test of blogging system';
$content = 'If you can read this, then the new system is compatible with MSSQL';
// Bind values
mssql_bind($stmt, '@author', 'Felipe Pena', SQLVARCHAR, false, false, 60);
mssql_bind($stmt, '@date', '08/10/2008', SQLVARCHAR, false, false, 20);
mssql_bind($stmt, '@title', $title, SQLVARCHAR, false, false, 60);
mssql_bind($stmt, '@content', $content, SQLTEXT);
// Execute the statement
mssql_execute($stmt);
// And we can free it like so:
mssql_free_statement($stmt);
?>
NOTES
Note
If the stored procedure returns parameters or a return value these will be available after the call to mssql_execute(3) unless the
stored procedure returns more than one result set. In that case use mssql_next_result(3) to shift through the results. When the last
result has been processed the output parameters and return values will be available.
SEE ALSO mssql_bind(3), mssql_free_statement(3), mssql_init(3).
PHP Documentation Group MSSQL_EXECUTE(3)
Check Out this Related Man Page
MSSQL_FREE_STATEMENT(3)MSSQL_FREE_STATEMENT(3)mssql_free_statement - Free statement memorySYNOPSIS
bool mssql_free_statement (resource $stmt)
DESCRIPTION mssql_free_statement(3) only needs to be called if you are worried about using too much memory while your script is running. All statement
memory will automatically be freed when the script ends. You may call mssql_free_statement(3) with the statement identifier as an argument
and the associated statement memory will be freed.
PARAMETERS
o $stmt
- Statement resource, obtained with mssql_init(3).
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
mssql_free_statement(3) example
<?php
// Create a new statement
$stmt = mssql_init('test');
// Bind values here and execute the statement
// once we're done, we clear it from the memory
// using mssql_free_statement like so:
mssql_free_statement($stmt);
?>
SEE ALSO mssql_bind(3), mssql_execute(3), mssql_init(3), mssql_free_result(3).
PHP Documentation Group MSSQL_FREE_STATEMENT(3)
I have a db2 stored procedure on my database which require 3 parameters, I have the following db2 command in a sql script
CONNECT TO SAMPLE;
CALL BACKUP(INPUT_1, INPUT_2, INPUT3);
Usually, I would just invoke this sql script from my shell script like below
db2 -tf... (1 Reply)
Hi
I need help in sed a file which looks like this:-
5 if 10 20
{
7 stmt 11 21
9 else if 12 22
8 stmt 13 23
}
to only output:-
5 if 10 20
7 stmt 11 21
9 else if 12 22
8 stmt 13 23 (1 Reply)
Hi ,
I have a dellimited .dat file and a sqlloader.
I want to call the sqlloader from a oracle stored procedure.
The procedure should return the result of sqlloader's execution. (3 Replies)
Hi
i am calling a stored procedure from unix shell like this call
test_proc('0002','20100218');
the stored procedure was giving output
like this dbms_output.put_line(' processed earlier');
i want to see the output in the unix shell where i called.
Thanks
barani (6 Replies)
Hi
i want to call a oracle stored procedure from unix (using bash shell).
consider this is my oracle stored procedure with parameter
create procedure testproc(name IN varchar, age IN Number, id OUT Number )
AS
begin
id=1;
dbms_output.put.line('successfull validation')
end;... (6 Replies)
Hi Dudes :)
I want a unix shell script to pass value to SQL stored procedure.
Below is the procedure
declare
res varchar2(10);
begin
odm_load_check('PRE_SANITY',res);
dbms_output.put_line(res);
end;
select * from error_log;
truncate table error_log;
select * from test; (1 Reply)
Hi,
I have a sybase stored procedure which takes two input parameters (start_date and end_date) and when it get executed, it gives few records as an output.
I want to write a unix script (ksh) which login to the sybase database, then execute this stored procedure (takes the input parameter as... (8 Replies)
Hello,
I have following problem.
I have the result of a database request. I preparated the result via sed, etc. as a string in a file.
The string in the file is:
($3==1 || $3==2 || $3==3 || $3==4)
Now I want to use the String as a command in an if-statement.
So I assigned the string to a... (3 Replies)
CT=0
while read LINE
do
# Check to see if the LINE is non-empty, and has a <td> tag in it.
if
then
# Increase the TD counter by 1
CT=`echo "$CT+1"`
fi
done <test.htmthrows this error: ksh: test: argument expected
test.htm
<tr>
<td>text</td... (4 Replies)
#! /bin/ksh
rm -f ./xyz file --- this line is working
// Below any if stmt is not working.
if
then
echo " blah blah "
fi
or I replaced above if with
if
then
echo "dir exists"
fi
This is also not working.
I am new to KSH. So can someone help why if stmt is not... (31 Replies)
Hi frnds
Im facing an issues while trying to compare string using IF stmt, my code is:
chkMsgName=`Service Fee Detail`
if
then
if
then
if
then
echo "Valid File Ready for processing"
fi
fi
... (5 Replies)
HI,
I am calling a stored procedure to archieve records from the DB based on a date condition. The syntax for the same is as below:
shell script - xyz.sh
sqlcmd -s<servername> -U <username> -p<password> -I <embedded SQL input file>
The contents of the Embedded SQL INput file are... (10 Replies)
As the title states, when should I use or ] when writing an if statement or something like that, i am not quite sure where the difference lies, and when i should use the first from the latter one? (7 Replies)