Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mssql_execute(3) [php man page]

MSSQL_EXECUTE(3)														  MSSQL_EXECUTE(3)

mssql_execute - Executes a stored procedure on a MS SQL server database

SYNOPSIS
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 memory

SYNOPSIS
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)
Man Page

15 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Oracle stored procedure.

I am using sqlplus. I have the stored procedure name. How can i print the stored procedure content? (2 Replies)
Discussion started by: kamil
2 Replies

2. Shell Programming and Scripting

DB2 stored procedure (with input parameters) from script

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)
Discussion started by: mpang_
1 Replies

3. Shell Programming and Scripting

calling a PL/SQL stored procedure from KSH

Hi I have a stored procedure which should be called from KSH. Could ayone please help me with this. Thanks (1 Reply)
Discussion started by: BlAhEr
1 Replies

4. Shell Programming and Scripting

Help in extracting only certain elements in file

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)
Discussion started by: ahjiefreak
1 Replies

5. Programming

How to call sqlloader from stored procedure!!! Advise

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)
Discussion started by: Haque123
3 Replies

6. Shell Programming and Scripting

how to pass the values to unix shell from the oracle stored procedure.

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)
Discussion started by: barani75
6 Replies

7. Shell Programming and Scripting

how to call oracle stored procedure from unix shell

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)
Discussion started by: barani75
6 Replies

8. Shell Programming and Scripting

Passing a value to stored procedure from unix shell script

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)
Discussion started by: shirdi
1 Replies

9. Shell Programming and Scripting

Execute stored procedure through script in sybase database and store the output in a .csv file

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)
Discussion started by: amit.mathur08
8 Replies

10. Shell Programming and Scripting

file content as a part of an if-statement

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)
Discussion started by: Dr_Aleman
3 Replies

11. Shell Programming and Scripting

if stmt argument expected error

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)
Discussion started by: dba_frog
4 Replies

12. Shell Programming and Scripting

If statement is not working in KSH

#! /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)
Discussion started by: saggy9583
31 Replies

13. Shell Programming and Scripting

Problem comparing String using IF stmt

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)
Discussion started by: balesh
5 Replies

14. Shell Programming and Scripting

How to pass date to SQL server SP?

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)
Discussion started by: Rahul Raj
10 Replies

15. UNIX for Beginners Questions & Answers

When should i use [] or [[]]?

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)
Discussion started by: kidi
7 Replies