Questions tagged [adodb-php]

ADOdb is a an open source PHP database abstraction layer, schema management tool, session management and date/time library.

ADOdb is a PHP database abstraction layer originally developed as a proprietary product by John Lim, but is now an active open source community project. The project website can be found at ADOdb.org.

The library allows portable SQL code to be written to access a wide range of databases. In addition to the core functionality it provides the following features:

  • A high performance alternative to the PHP pear mdb libraries.
  • A full suite of utilities to manage data dictionaries including XML based schema management.
  • A standalone Date/Time library that allows access to dates outside the normal PHP limits
  • A session management library that allows sessions to be encrypted and/or stored inside a database table.

Note: Not to be confused with Microsoft's ActiveX Data Objects.

62 questions
12
votes
4 answers

What are the differences between ADOdb and PDO in PHP?

Both seem to try making it simpler using a database in PHP. Both seem to provide an abstraction over different database types like MySQL, SQLite, etc. What are the differences between both ADOdb and PDO?
openfrog
  • 40,201
  • 65
  • 225
  • 373
9
votes
5 answers

Using Adodb for php/postgresql, return row ID after insert

When I insert a row, it increments the ID field using SERIAL. How can I return the newly created ID number right after the insert? (Database is Postgresql.)
Nic Hubbard
  • 41,587
  • 63
  • 251
  • 412
8
votes
1 answer

PHP Deprecated: Automatic conversion of false to array is deprecated adodb-mssqlnative.inc.php on line 154

We are upgrading PHP to version 8.1. Using MS Sql Server DB. It all seems to work correctly but I see repeated messages in the log file: [03-Feb-2022 11:51:18 America/New_York] PHP Deprecated: Automatic conversion of false to array is deprecated…
kuru
  • 77
  • 1
  • 1
  • 4
6
votes
3 answers

Retrieve all rows from table in doctrine

I have table with 100 000+ rows, and I want to select all of it in doctrine and to do some actions with each row, in symfony2 with doctrine I try to do with this query: $query = $this->getDefaultEntityManager() …
Donatas Veikutis
  • 974
  • 2
  • 15
  • 36
5
votes
2 answers

ADOdb output has double values

When retrieving data from MySQL, the PHP array output has both numeric and name indexes. How can I prevent this? I fetch using: $stmt = $this->dbObj->Prepare($sql); $rs = $this->dbObj->Execute($stmt); if (!$rs) { …
Sascha Heim
  • 301
  • 1
  • 4
  • 15
4
votes
2 answers

Variable binding in PHP ADOdb

Does ADOdb do data sanitation or escaping within the same functionality by default? Or am I just confusing it with Code Igniter's built-in processes? Does binding variables to parameters in ADOdb for PHP prevent SQL injection in any way?
Adam
  • 7,800
  • 2
  • 25
  • 24
4
votes
2 answers

ADOdb is returning both column names and number indexes

ADOdb fetchRow output: Array ( [0] => ABC [NAME] => ABC [1] => 33 [AGE] => 33 [3] => M [GENDER] => M [4] => LA [CITY] => LA [5] => OH [STATE] => OH ) How can I get the number-index only output: Array ( [0] => ABC [1] =>…
maxjackie
  • 22,386
  • 6
  • 29
  • 37
3
votes
1 answer

ADOdb gives "Fatal error: Cannot pass parameter 2 by reference"

I've using ADOdb Execute function: $query = "select * from users where user_id = ? and PWD = ?"; $execute = $conn->Execute($query,array($username, $password)); Which gives the error: Fatal error: Cannot pass parameter 2 by reference I have no idea…
lovefaithswing
  • 1,510
  • 1
  • 21
  • 37
3
votes
1 answer

Executing PHP CURL in While Loop

I have a table where I want to run a PHP script during the maintenance. I have the following code. $sql = "SELECT `id`, `url` FROM `log_requests` WHERE `is_sent` = '0'"; $e = $conn->execute($sql); My url array after fetching the table from…
yuri1000
  • 361
  • 4
  • 21
3
votes
1 answer

Class: ADORecordSet_mysql Easy way to get an Array indexed by id of row

I have a table with a primary key called 'id' and I am using ADODB and getting a ADORecordSet_mysql back. I need an array where the id is associated with a row in the result set, but ADODBRecordSet_mysql only seems to have a GetArray(int…
stevebot
  • 23,275
  • 29
  • 119
  • 181
2
votes
2 answers

PHP - Get affected rows in ADODB

I using ADODB to create a connection to my database. I update the data in my database, there is no error. The problem is that I can't get the number of affected rows by Affected_Rows(). I tried with very simple code but it is not working. Here is my…
Trung
  • 81
  • 1
  • 9
2
votes
2 answers

PHP ADOdb, How to test if query is "insert, update, delete, or drop"?

MySQL/i's $db->query('some query') will return a result set for successful SELECT, SHOW, DESCRIBE or EXPLAIN, or return true for successful INSERT, UPDATE, DELETE, DROP, etc. As such, we can easily identify the "type" of query: $result =…
Pacerier
  • 86,231
  • 106
  • 366
  • 634
2
votes
3 answers

Calling Stored Procedure using ADODB in PHP

I couldn't find a proper documentation on how to call a stored procedure using ADODB in PHP. Can someone help please? This is what I have now and I feel it's a dirty approach (or not?): $stmt = "CALL LocFillData('foo', 'bar', @nullcount,…
Nirmal
  • 9,391
  • 11
  • 57
  • 81
2
votes
6 answers

How to get "field names" using PHP ADOdb?

I'm using PHP ADOdb and I can get the result set: $result = &$db->Execute($query); How do I get the field names from that one row and loop through it? (I'm using access database if that matters.)
Abs
  • 56,052
  • 101
  • 275
  • 409
2
votes
3 answers

php adodb MSSQL connection

I have a linux server that I'm trying to use php adodb to connect to a MSSQL server. include('adodb5/adodb.inc.php'); $conn =& ADONewConnection('odbc_mssql'); $dsn = "Driver={SQL…
Shane
  • 1,603
  • 4
  • 26
  • 54
1
2 3 4 5