1 2 3 4 5 6 > >>   ∑:454  Sort:Rank

Returning Result from Query with MSSQL Connection
How To Receive Returning Result from a Query? When you execute a SQL SELECT statement with the mssql_query() function, you can capture the returning result with a result set object with the following syntax: $result_set = mssql_query($sql_statement); #- The returning value could be a Boolean value F...
2024-03-23, 1185🔥, 0💬

mssql_field_name() - Retrieve Field Names
How To List All Field Names in the Result Set using mssql_field_name()? The result set object returned by a SELECT statement also contains column (field) names, lengths and types. You can use mssql_field_name(), mssql_field_length() and mssql_field_type() to get those information. The tutorial exerc...
2024-03-23, 1184🔥, 0💬

mssql_fetch_array() - Looping through Result Set Objects
How To Loop through Result Set Objects using mssql_fetch_array()? If the returning output of a query statement is captured in a result set object, you can use mssql_fetch_array() to loop through each row in the output. The tutorial PHP script below shows you how to list tables in the database: &...
2024-03-23, 1183🔥, 0💬

Turning Off PHP Warning Messages for MSSQL Connection
How To Turn Off Warning Messages during PHP Execution? If don't want see warning messages generated from the PHP engine when executing PHP scripts, you can change the error_reporting setting in the php.ini configuration file. Open php.ini and change the following lines: ;error_reporting = E_ALL &...
2024-03-23, 1182🔥, 0💬

mssql_result() - Retrieve Field Values
How To Retrieve Field Values using mssql_result()? Once the result set is captured in an object, you can think of it as a "table" with rows and columns (fields). You can use mssql_result() to retrieve the value of any given row and column (field) with this formats: $value = mssql_result($res, $row, ...
2024-03-23, 1177🔥, 0💬

Connecting MS Access to SQL Servers through ODBC
How To Connect MS Access to SQL Servers through ODBC? Once you got a DSN defined in the ODBC manager that connects to your SQL Server, you can connect a normal MS Access document to the Oracle server, and link an Access table to a SQL Server table. The tutorial below gives you a good example: Start ...
2024-03-17, 1207🔥, 0💬

Requirements to Use ODBC Connections in PHP
What Are the Requirements to Use ODBC Connections in PHP Scripts? If you are planning to use ODBC connections to access SQL Server databases in PHP scripts, you need to check the following requirements: The PHP engine must support ODBC functions. If you install PHP 5.2.2 from The PHP Group, the ODBC...
2024-03-17, 1206🔥, 0💬

Commonly Used ODBC Functions in PHP
What Are Commonly Used ODBC Functions in PHP? If you look at the PHP 5 manual, you will see a group of functions listed under the ODBC Functions (Unified) section. The commonly used ODBC functions are: odbc_connect � Establish an OBDC connection. odbc_data_source � Returns information about a curren...
2024-03-17, 1198🔥, 0💬

SQL Server FAQs - PHP ODBC Functions - Connection and Query Execution
A collection of 14 FAQs on using PHP ODBC functions to connect to SQL Server databases. Clear explanations and tutorial exercises are provided on testing ODBC DSN settings; creating connection to a SQL Server through a DSN; executing SQL statements; looping through result set; Executing prepared sta...
2024-03-17, 1197🔥, 0💬

Connecting Windows Applications to SQL Servers via ODBC
How Can Windows Applications Connect to SQL Servers via ODBC? One way of connecting a windows application to a SQL Server is to use ODBC drivers. The requirements to do this is summarized here: The SQL Server must have TCP/IP protocol enabled with a specific port number. The SQL Server Browser Servi...
2024-03-17, 1196🔥, 0💬

PHP MSSQL - Dropping an Existing Table
PHP MSSQL - How To Drop an Existing Table? If you need to delete a table created before, you can run the DROP TABLE SQL statement using the mssql_query() function, as shown in the following sample script: <?php $con = mssql_connect('LOCALHOST','sa' ,'FYIcenter');mssql_select_db('FyiCenterData ...
2024-03-07, 1220🔥, 0💬

PHP MSSQL - Creating a New Table
PHP MSSQL - How To Create a New Table? If you want to create a table in the SQL Server database, you can run the CREATE TABLE SQL statement using the mssql_query() function, as shown in the following sample script: <?php $con = mssql_connect('LOCALHOST','sa' ,'FYIcenter');mssql_select_db('Fyi...
2024-03-07, 1205🔥, 0💬

PHP MSSQL - Inserting Data into an Existing Table
PHP MSSQL - How To Insert Data into an Existing Table? If you want to insert a row of data into an existing table, you can use the INSERT INTO statement as shown in the following sample script: <?php $con = mssql_connect('LOCALHOST','sa' ,'FYIcenter');mssql_select_db('FyiCenterData ',$con); $...
2024-03-07, 1198🔥, 0💬

SQL Server FAQs - PHP MSSQL Functions - Managing Tables and Data Rows
A collection of 17 FAQs on using PHP MSSQL functions to connect to manage tables and data rows. Clear explanations and tutorial exercises are provided on creating tables; inserting multiple data rows; updating and deleting data rows; searching data from multiple tables; looping through result sets; ...
2024-03-07, 1195🔥, 0💬

PHP MSSQL - Making Columns to Take NULL
PHP MSSQL - How To Make a Column Nullable? Based on the testing result from the previous tutorial you can find out that there is a big difference in the column definition when running CREATE TABLE statement with mssql_query(): If CREATE TABLE is executed through mssql_query() and "NULL/NOT NULL" key...
2024-03-07, 1185🔥, 0💬

PHP MSSQL - mssql_fetch_array() - Looping through Returning Rows
PHP MSSQL - How To Loop through Returning Rows? The best way to query tables and loop through returning rows is to run a SELECT statement with the mssql_query() function, catch the returning object as a result set, and loop through the result with mssql_fetch_array() function in a while loop as show...
2024-02-28, 1214🔥, 0💬

PHP MSSQL - mssql_rows_affected() - Number of Affected Rows
PHP MSSQL - How To Get the Number of Affected Rows? If you insert multiple rows with a single INSERT statement, you can use the mssql_rows_affected() function to find out how many rows were inserted. mssql_rows_affected($connectio n)returns the number of affected rows of the last INSET, UPDATE or DE...
2024-02-28, 1212🔥, 0💬

PHP MSSQL - Inserting Multiple Rows with a Subquery
PHP MSSQL - How To Insert Multiple Rows with a subquery? If want to insert rows into a table based on data rows from other tables, you can use a subquery inside the INSERT statement as shown in the following script example: <?php $con = mssql_connect('LOCALHOST','sa' ,'FYIcenter');mssql_selec...
2024-02-28, 1202🔥, 0💬

PHP MSSQL - Returning Result Set Objects
PHP MSSQL - What Is a Result Set Object Returned by mssql_query()? A result set object is a logical representation of data rows returned by mssql_query() function on SELECT statements. Every result set object has an internal pointer used to identify the current row in the result set. Once you get a ...
2024-02-28, 1198🔥, 0💬

PHP MSSQL - Inserting Data with NULL Values
PHP MSSQL - How To Insert Data with NULL Values? There are two ways to provide NULL value to a column in an INSERT statement: Include the column in the statement, but specify keyword NULL as the value. Exclude the column from the statement. The following tutorial exercise inserts two rows. Both of t...
2024-02-28, 1191🔥, 0💬

PHP MSSQL - Updating Existing Rows in a Table
PHP MSSQL - How To Update Existing Rows in a Table? Updating existing rows in a table requires to run the UPDATE statement with a WHERE clause to identify the row. The following sample script updates one row with two new values: <?php $con = mssql_connect('LOCALHOST','sa' ,'FYIcenter');mssql_...
2024-02-18, 1240🔥, 0💬

PHP MSSQL - Deleting Existing Rows in a Table
PHP MSSQL - How To Delete Existing Rows in a Table? If you want to remove a row from a table, you can use the DELETE statement with a WHERE clause to identify the row. The following sample script deletes one row: <?php $con = mssql_connect('LOCALHOST','sa' ,'FYIcenter');mssql_select_db('FyiCe...
2024-02-18, 1232🔥, 0💬

PHP MSSQL - Including Date and Time Values in SQL Statements
PHP MSSQL - How To Include Date and Time Values in SQL Statements? If you want to provide date and time values in a SQL statement, you should write them in the format of "yyyy-mm-dd hh:mm:ss", and quoted with single quotes ('). The tutorial exercise below shows you two INSERT statements. The first o...
2024-02-18, 1224🔥, 0💬

PHP MSSQL - Including Text Values in SQL Statements
PHP MSSQL - How To Include Text Values in SQL Statements? Text values in SQL statements should be quoted with single quotes ('). If the text value contains a single quote ('), it should be protected by replacing it with two single quotes (''). In SQL language syntax, two single quotes represents one...
2024-02-18, 1214🔥, 0💬

1 2 3 4 5 6 > >>   ∑:454  Sort:Rank