Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Product Manuals » ElevateDB Version 2 PHP Extension Manual » Connection Functions » edb_execsql |
edb_execsql(<ConnectionHandle>, <SQL>) <ConnectionHandle> = Handle of connection returned by edb_connect function <SQL> = Valid SQL statement
Affected row count (where applicable) if successful, or FALSE if there are any errors
<?php // The following script connects to an ElevateDB // Server and the system Configuration database, // creates a new database if it doesn't already exist, // changes to the new database using the edb_changedb() // function, and then disconnects using the // edb_disconnect() function $con = edb_connect("type=remote;charset=Ansi;address=127.0.0.1;"+ "uid=Administrator;pwd=EDBDefault;database=Configuration"); if (!$con) { die("Could not connect: " . edb_errmsg()); } echo edb_db($con); if (edb_execsql($con,"SELECT * FROM Databases WHERE Name='Tutorial'") == 0) { edb_execsql($con,"CREATE DATABASE Tutorial PATH 'C:\Tutorial'"); } edb_changedb($con,"Tutorial"); echo edb_db($con); edb_disconnect($con); ?>
This web page was last updated on Thursday, November 16, 2023 at 10:39 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |