< 1 2 3 4 5 6 7 > >>   ∑:509  Sort:Rank

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

SQL Server FAQs - PHP ODBC Functions - Managing Tables and Data Rows
A collection of 14 FAQs on using PHP ODBC 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; w...
2024-06-03, 1449🔥, 0💬

PHP ODBC - Creating a New Table
PHP ODBC - How To Create a New Table? If you want to create a table in the database connected through a ODBC DSN, you can run the CREATE TABLE SQL statement using the odbc_exec() function, as shown in the following sample script: &lt;?php $con = odbc_connect('FYI_SQL_SERVER', 'sa','FYIcenter');#...
2024-06-03, 1438🔥, 0💬

PHP ODBC - Inserting Data into an Existing Table
PHP ODBC - 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: &lt;?php $con = odbc_connect('FYI_SQL_SERVER', 'sa','FYIcenter');$sql = "INSERT INTO fyi_links (id, url...
2024-06-03, 1407🔥, 0💬

odbc_prepare() - Creating Prepared Statements
How To Create Prepared Statements using odbc_prepare()? If you have a SQL statement that need to executed repeatedly many times with small changes, you can create a prepared statement object with parameters so it can be executed more efficiently. There are two functions you need to use prepare and e...
2024-06-03, 1382🔥, 0💬

odbc_columns() - Listing All Columns in a Table
How To List All Columns in a Table using odbc_columns()? If you want to get a list of all columns in a table, you can use the odbc_columns() function, which can actually be used to list all columns in all tables and views in the database. The syntax of odbc_columns() is: $result_set = odbc_columns($...
2024-06-03, 1340🔥, 0💬

PHP ODBC - Updating Existing Rows in a Table
PHP ODBC - 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: &lt;?php $con = odbc_connect('FYI_SQL_SERVER', 'sa','FYIcenter');$sq...
2024-05-29, 1458🔥, 0💬

PHP ODBC - Returning Result Set Objects
PHP ODBC - What Is a Result Set Object Returned by odbc_exec()? A result set object is a logical representation of data rows returned by odbc_exec() 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 resul...
2024-05-29, 1383🔥, 0💬

PHP ODBC - odbc_num_rows() - Number of Affected Rows
PHP ODBC - How To Get the Number of Affected Rows? If you insert multiple rows with a single INSERT statement, you can use the odbc_num_rows() function to find out how many rows were inserted. odbc_num_rows($result_set) returns the number of affected rows based on the result set object returned by t...
2024-05-29, 1372🔥, 0💬

PHP ODBC - Inserting Multiple Rows with a Subquery
PHP ODBC - 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: &lt;?php $con = odbc_connect('FYI_SQL_SERVER', 'sa','FYIcenter');$sql = "...
2024-05-29, 1369🔥, 0💬

PHP ODBC - odbc_fetch_array() - Looping through Returning Rows
PHP ODBC - 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 odbc_exec() function, catch the returning object as a result set, and loop through the result with odbc_fetch_array() function in a while loop as shown in...
2024-05-29, 1368🔥, 0💬

PHP ODBC - Deleting Existing Rows in a Table
PHP ODBC - 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: &lt;?php $con = odbc_connect('FYI_SQL_SERVER', 'sa','FYIcenter');$sql = "DELETE FROM...
2024-05-05, 1470🔥, 0💬

PHP ODBC - Including Date and Time Values in SQL Statements
PHP ODBC - 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 on...
2024-05-05, 1464🔥, 0💬

PHP ODBC - Computing Date and Time Differences
PHP ODBC - How To Display a Past Time in Days, Hours and Minutes? You have seen a lots of Websites are displaying past times in days, hours and minutes. If you want to do this yourself, you can use the DATEDIFF() SQL function The following tutorial exercise shows you how to use DATEDIFF() to present...
2024-05-05, 1400🔥, 0💬

PHP ODBC - Including Text Values in SQL Statements
PHP ODBC - 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-05-05, 1400🔥, 0💬

PHP ODBC - Searching Records by Keywords
PHP ODBC - How To Perform Key Word Search in Tables? The simplest way to perform key word search is to use the SELECT statement with a LIKE operator in the WHERE clause. The LIKE operator allows you to match a text field with a keyword pattern specified as '%keyword%', where (%) represents any numbe...
2024-05-05, 1338🔥, 0💬

SQL Server FAQs - PHP MSSQL Functions - Connections and Query Execution
A collection of 18 FAQs on connecting to MS SQL Server with PHP scripts. Clear explanations and tutorial exercises are provided on SQL Server connection; providing port number; selecting database; running SQL statements; checking execution errors; looping through query result; looping through result...
2024-04-29, 1441🔥, 0💬

Requirements for Connecting PHP to MS SQL Server
What Do You Need to Connect PHP to SQL Server? If you want to access MS SQL Server in your PHP script, you need to make sure that: 1. MSSQL API module (extension) is installed and turned on in your PHP engine. If you installed the Windows binary version of PHP 5.2.3, MSSQL API module is included but...
2024-04-29, 1429🔥, 0💬

PHP ODBC - Creating an Identity Column
PHP ODBC - How To Create an Identity Column? Many tables require an ID column to assign a unique ID number for each row in the table. For example, if you have a table to hold forum member profiles, you need an ID number to identify each member. To allow SQL Server to automatically assign a new ID nu...
2024-04-29, 1406🔥, 0💬

Checking Your PHP Installation
How To Check Your PHP Installation? PHP provides two execution interfaces: Command Line Interface (CLI) and Common Gateway Interface (CGI). If PHP is installed in the \php directory on your system, you can try this to check your installation: Run "\php\php -v" command to check the Command Line Inter...
2024-04-29, 1368🔥, 0💬

Downloading and Installing PHP on Windows
How To Download and Install PHP on Windows? PHP is one of the most popular languages to develop dynamic Web pages. It supports all major database servers, including: MySQL, MS SQL Server, Oracle, mSQL, Sybase, etc. If you are developing a Web application that uses PHP and needs to access MS SQL Serv...
2024-04-29, 1346🔥, 0💬

Turning on the MSSQL API Module
How to Turn on the MSSQL API Module? If you want to access SQL Server database with PHP scripts, the first thing you need to do is to turn on the MSSQL API Module as shown in this tutorial: 1. Prepare a single line script to test the MSSQL API Module: &lt;?php mssql_connect('LOCALHOST','sa' ,'FYI...
2024-04-14, 1439🔥, 0💬

mssql_connect() - Connecting to Different Port Numbers
How To Connect with Different Port Numbers? You know that SQL Server could be configured to accept connections with different TCP/IP port numbers. See other tutorial collections on how to view and configure SQL Server TCP/IP protocol. If you installed SQL Server 2005 Express Edition with default set...
2024-04-14, 1383🔥, 0💬

Missing ntwdblib.dll for MSSQL connection
What Happens If ntwdblib.dll Is Missing on Your Machine? In order to install the proper version of ntwdblib.dll on your machine, you need to find out how many copies of ntwdblib.dll do you have on your machine and what are the version numbers on those copies. 1. Go to Start &gt; Search &gt; ...
2024-04-14, 1374🔥, 0💬

< 1 2 3 4 5 6 7 > >>   ∑:509  Sort:Rank