# General Database (Oracle, SQL Server, etc)

**URL:** https://www.phphelp.com/c/general-database-oracle-sql-server-etc/7.md

[Latest](https://www.phphelp.com/latest.md) · [Categories](https://www.phphelp.com/categories.md)

---

## [About the General Database (Oracle, SQL Server, etc) category](https://www.phphelp.com/t/about-the-general-database-oracle-sql-server-etc-category/8559)

<div class="topic-metadata">

**Author:** [@system](https://www.phphelp.com/u/system)\
**Replies:** 0\
**Last updated:** [July 16, 2018, 5:46am UTC](https://www.phphelp.com/t/about-the-general-database-oracle-sql-server-etc-category/8559 "2018-07-16T05:46:13Z")

</div>

Accessing a relational database from PHP applications, executing SQL queries, etc.

---

## [Help with changing this sql code](https://www.phphelp.com/t/help-with-changing-this-sql-code/33979)

<div class="topic-metadata">

**Author:** [@chrisj](https://www.phphelp.com/u/chrisj)\
**Replies:** 4\
**Last updated:** [September 21, 2021, 3:32am UTC](https://www.phphelp.com/t/help-with-changing-this-sql-code/33979 "2021-09-21T03:32:33Z")

</div>

I didn’t write this web script code, but I’m trying to modify it. I am attempting to have this: $get\_videos = $db-\>rawQuery("SELECT DISTINCT(v.id), v.\* FROM u\_paid\_videos AS upv LEFT JOIN " . T\_VIDEOS . " AS v ON (upv.…

---

## [Performance problems with complex SQL SELECT queries](https://www.phphelp.com/t/performance-problems-with-complex-sql-select-queries/33874)

<div class="topic-metadata">

**Author:** [@kenatsun](https://www.phphelp.com/u/kenatsun)\
**Replies:** 3\
**Last updated:** [September 6, 2021, 4:25am UTC](https://www.phphelp.com/t/performance-problems-with-complex-sql-select-queries/33874 "2021-09-06T04:25:47Z")

</div>

I have a PHP app that accesses a SQLite database using PDO (PHP Data Objects). One page in this app requires repeated execution of some complex SELECT queries (with different args for each execution). My problem is tha…

---

## [Cannot add or update a child row: a foreign key constraint fails](https://www.phphelp.com/t/cannot-add-or-update-a-child-row-a-foreign-key-constraint-fails/33518)

<div class="topic-metadata">

**Author:** [@iliji](https://www.phphelp.com/u/iliji)\
**Replies:** 16\
**Last updated:** [May 20, 2021, 3:25pm UTC](https://www.phphelp.com/t/cannot-add-or-update-a-child-row-a-foreign-key-constraint-fails/33518 "2021-05-20T15:25:07Z")

</div>

So I’ve been trying to insert data into a table called poubelle through a web page but each time I received this error but I don’t understand why I’m getting this error thats prevents me from inserting data. Any help is …

---

## [How do I Print Websocket Stream live Data on html ? I'm using WampServer on window 10](https://www.phphelp.com/t/how-do-i-print-websocket-stream-live-data-on-html-im-using-wampserver-on-window-10/33215)

<div class="topic-metadata">

**Author:** [@oni](https://www.phphelp.com/u/oni)\
**Replies:** 2\
**Last updated:** [March 5, 2021, 6:36pm UTC](https://www.phphelp.com/t/how-do-i-print-websocket-stream-live-data-on-html-im-using-wampserver-on-window-10/33215 "2021-03-05T18:36:32Z")

</div>

I’m currently trying to building a websocket widget, using node package manager(NPM),WAMPserver and electronjs.Here is the link to the WebSocket APIs. : https://www.npmjs.com/package/binance The package was well instal…

---

## [Converting Postgres Connection to MySQL](https://www.phphelp.com/t/converting-postgres-connection-to-mysql/32746)

<div class="topic-metadata">

**Author:** [@hobbyist](https://www.phphelp.com/u/hobbyist)\
**Replies:** 1\
**Last updated:** [November 2, 2020, 8:03pm UTC](https://www.phphelp.com/t/converting-postgres-connection-to-mysql/32746 "2020-11-02T20:03:31Z")

</div>

Hello, I’m sorry to bother you with my newbie question. I’m going to need the help of someone to convert the following Postgres DB connection to MySQL and what line of code I might need to change in other pages. The con…

---

## ["Call to undefined function oci\_connect()" error on Mac](https://www.phphelp.com/t/call-to-undefined-function-oci-connect-error-on-mac/32355)

<div class="topic-metadata">

**Author:** [@coder0001](https://www.phphelp.com/u/coder0001)\
**Replies:** 0\
**Last updated:** [August 11, 2020, 4:10am UTC](https://www.phphelp.com/t/call-to-undefined-function-oci-connect-error-on-mac/32355 "2020-08-11T04:10:05Z")

</div>

Hello everyone, I am developing a website that connects to an Oracle Database with php. In order to achieve this, I have tried adding an oci\_connect() extension to php.ini file stored in MAMP in order to run it with php.…

---

## [Win 2019 IIS PHP 7.4 Oracle 12c connection issues](https://www.phphelp.com/t/win-2019-iis-php-7-4-oracle-12c-connection-issues/31991)

<div class="topic-metadata">

**Author:** [@leep](https://www.phphelp.com/u/leep)\
**Replies:** 0\
**Last updated:** [June 2, 2020, 3:50pm UTC](https://www.phphelp.com/t/win-2019-iis-php-7-4-oracle-12c-connection-issues/31991 "2020-06-02T15:50:54Z")

</div>

So my set up is Windows 2019 std server IIS plus CGI add on Web Platform Installer PHP 7.4 installed via WebPI Oracle 12c 64bit client Website loads simple phpinfo shows PHP up Connection to Oracle via our web ap…

---

## [PHP - generate team based on seniority](https://www.phphelp.com/t/php-generate-team-based-on-seniority/31934)

<div class="topic-metadata">

**Author:** [@iamakids](https://www.phphelp.com/u/iamakids)\
**Replies:** 0\
**Last updated:** [May 24, 2020, 5:43pm UTC](https://www.phphelp.com/t/php-generate-team-based-on-seniority/31934 "2020-05-24T17:43:22Z")

</div>

I would like to generate team by their seniority based on the available members. For example : I have 60 members. I want use all this 60 members as teams. Each team has one leader,one asst leader, and 8 members (1+1+8) …

---

## [PHP to Connect to Pervasive SQL](https://www.phphelp.com/t/php-to-connect-to-pervasive-sql/31026)

<div class="topic-metadata">

**Author:** [@YitzchakK](https://www.phphelp.com/u/YitzchakK)\
**Replies:** 3\
**Last updated:** [February 12, 2020, 7:56pm UTC](https://www.phphelp.com/t/php-to-connect-to-pervasive-sql/31026 "2020-02-12T19:56:20Z")

</div>

I have some PhP code to connect to a Pervasive SQL database but it is not working. See code and screenshots of the Pervasive SQL Drivers as well as the Database ODBC details. I need help in finding the problem why my s…

---

## [Trying to pull mysql data but put it in as php variables](https://www.phphelp.com/t/trying-to-pull-mysql-data-but-put-it-in-as-php-variables/30761)

<div class="topic-metadata">

**Author:** [@mrbell11](https://www.phphelp.com/u/mrbell11)\
**Replies:** 4\
**Last updated:** [January 8, 2020, 11:25am UTC](https://www.phphelp.com/t/trying-to-pull-mysql-data-but-put-it-in-as-php-variables/30761 "2020-01-08T11:25:04Z")

</div>

So currently I’m trying to put data from mysql into a php variable. This is mainly because I don’t want to have to go back and change everything that has a variable into the mysql variable, and I’ve been getting errors. …

---

## [Php and pgadmin](https://www.phphelp.com/t/php-and-pgadmin/30745)

<div class="topic-metadata">

**Author:** [@rufaro](https://www.phphelp.com/u/rufaro)\
**Replies:** 2\
**Last updated:** [January 7, 2020, 2:11pm UTC](https://www.phphelp.com/t/php-and-pgadmin/30745 "2020-01-07T14:11:58Z")

</div>

How can i create a search query in php which retrieves results as coordinates from postgresql and views the results as a map (google map or open street map)

---

## [How to install xdebug in centos 7?](https://www.phphelp.com/t/how-to-install-xdebug-in-centos-7/30686)

<div class="topic-metadata">

**Author:** [@aveeva](https://www.phphelp.com/u/aveeva)\
**Replies:** 0\
**Last updated:** [December 24, 2019, 11:03am UTC](https://www.phphelp.com/t/how-to-install-xdebug-in-centos-7/30686 "2019-12-24T11:03:50Z")

</div>

I am using centos 7 & apache server, for remote debug purpose in VS Code how to install and configure xdebug in Live GoDaddy VPS server? PHP version : 5.6

---

## [Upload image to MSSQL IIS database using PHP](https://www.phphelp.com/t/upload-image-to-mssql-iis-database-using-php/30053)

<div class="topic-metadata">

**Author:** [@stefvebe](https://www.phphelp.com/u/stefvebe)\
**Replies:** 3\
**Last updated:** [September 27, 2019, 6:22pm UTC](https://www.phphelp.com/t/upload-image-to-mssql-iis-database-using-php/30053 "2019-09-27T18:22:06Z")

</div>

Hello. I am new to SQL and trying to upload images to SQL database using PHP. When i run the script, the column “image” just upload this random numbers, like this: 0x74657374. I have set the Data Type to image. This …

---

## [Changes made in editable PHP Grid do not reflect in Oracle database](https://www.phphelp.com/t/changes-made-in-editable-php-grid-do-not-reflect-in-oracle-database/30018)

<div class="topic-metadata">

**Author:** [@Kately12](https://www.phphelp.com/u/Kately12)\
**Replies:** 1\
**Last updated:** [September 24, 2019, 5:31pm UTC](https://www.phphelp.com/t/changes-made-in-editable-php-grid-do-not-reflect-in-oracle-database/30018 "2019-09-24T17:31:01Z")

</div>

I’m working on a PHP Application with an Oracle Database. I have added a PHP Grid to the webpage which is editable using: $dg -\> enable\_edit("FORM", "CRUD"); However any changes that I make and press submit do not refl…

---

## [Php and sql server connection](https://www.phphelp.com/t/php-and-sql-server-connection/27904)

<div class="topic-metadata">

**Author:** [@jacknomiz](https://www.phphelp.com/u/jacknomiz)\
**Replies:** 2\
**Last updated:** [September 24, 2019, 4:37am UTC](https://www.phphelp.com/t/php-and-sql-server-connection/27904 "2019-09-24T04:37:41Z")

</div>

Hi, I was wondering if you can help please. I’m a complete newbie to php and got tasked with moving our php app from mysql to sql server 2012. My env is php 7.0.33 64bit TS running on windows 7, sql server 2012 running…

---

## [How to JOIN 4 tables](https://www.phphelp.com/t/how-to-join-4-tables/29756)

<div class="topic-metadata">

**Author:** [@idfrnffnd](https://www.phphelp.com/u/idfrnffnd)\
**Replies:** 6\
**Last updated:** [August 21, 2019, 2:07am UTC](https://www.phphelp.com/t/how-to-join-4-tables/29756 "2019-08-21T02:07:39Z")

</div>

Currently I have 4 tables. activity, category, pic and useraccount. In this system, there’s 2 user: applicant and person-in-charge. applicant will login and request for activity (which will be stored in table activity). …

---

## [PHP, MSSQL, Date Select](https://www.phphelp.com/t/php-mssql-date-select/29702)

<div class="topic-metadata">

**Author:** [@dreams3577](https://www.phphelp.com/u/dreams3577)\
**Replies:** 3\
**Last updated:** [August 15, 2019, 6:46am UTC](https://www.phphelp.com/t/php-mssql-date-select/29702 "2019-08-15T06:46:20Z")

</div>

Hi All I am trying to echo a date held within a MSSQL Table, the date is being stored as “2019-08-15 16:00:00.000” Table Columns id, Expected 4272, 2019-08-15 16:00:00.000 if I run the below select query in SQL Stu…

---

## [Exam in database](https://www.phphelp.com/t/exam-in-database/28573)

<div class="topic-metadata">

**Author:** [@Danoc](https://www.phphelp.com/u/Danoc)\
**Replies:** 1\
**Last updated:** [March 22, 2019, 6:17pm UTC](https://www.phphelp.com/t/exam-in-database/28573 "2019-03-22T18:17:53Z")

</div>

Hi guys, I have an exam in Database, which I don’t know a thing because I’ve never learned it. Below I’m giving you the exam questions, if anyone can help that would be great. You just need to tell me the right alternat…

---

## [Question concerning function call from HeidiSQL](https://www.phphelp.com/t/question-concerning-function-call-from-heidisql/28144)

<div class="topic-metadata">

**Author:** [@pkm](https://www.phphelp.com/u/pkm)\
**Replies:** 0\
**Last updated:** [January 21, 2019, 1:59pm UTC](https://www.phphelp.com/t/question-concerning-function-call-from-heidisql/28144 "2019-01-21T13:59:32Z")

</div>

I am doing a MariaDB tutorial at the moment. I access MariaDB by using HeidiSQL. I write the following function and its call into the query window of MariaDB: \`DELIMITER $$ CREATE FUNCTION example\_function(id INT) ret…

---

## [PHP Variable in SQL Select](https://www.phphelp.com/t/php-variable-in-sql-select/28056)

<div class="topic-metadata">

**Author:** [@bailop95](https://www.phphelp.com/u/bailop95)\
**Replies:** 1\
**Last updated:** [January 10, 2019, 5:48pm UTC](https://www.phphelp.com/t/php-variable-in-sql-select/28056 "2019-01-10T17:48:59Z")

</div>

Using a variable in the select sql statement below. Have echoed out the variable and is presenting the correct value. when used in the datalist SQL select, not having any luck? any ideas? \<datalist id="ampgain1"\> \<?php …

---

## [PHP Select from MYSQL with Variable](https://www.phphelp.com/t/php-select-from-mysql-with-variable/27990)

<div class="topic-metadata">

**Author:** [@bailop95](https://www.phphelp.com/u/bailop95)\
**Replies:** 2\
**Last updated:** [January 5, 2019, 2:06pm UTC](https://www.phphelp.com/t/php-select-from-mysql-with-variable/27990 "2019-01-05T14:06:47Z")

</div>

Hi, my below select statement is not outputting anything. I have used the same syntax on other statements that are working. The issue is with the variable $driver1 as when i replace this with test data, the statement ou…

---

## [Script to Load a list of #'s To Send a Msg To](https://www.phphelp.com/t/script-to-load-a-list-of-s-to-send-a-msg-to/27933)

<div class="topic-metadata">

**Author:** [@sharbison.hrm](https://www.phphelp.com/u/sharbison.hrm)\
**Replies:** 57\
**Last updated:** [January 2, 2019, 1:57pm UTC](https://www.phphelp.com/t/script-to-load-a-list-of-s-to-send-a-msg-to/27933 "2019-01-02T13:57:45Z")

</div>

PHP is certainly not my strong language, so I’m humbly asking for some expertise: I need to write a script in which a list of phone numbers are copied and pasted into the page and when submitted a line of code is genera…

---

## [Select Data from Mysql and use result as variable in PHP](https://www.phphelp.com/t/select-data-from-mysql-and-use-result-as-variable-in-php/27967)

<div class="topic-metadata">

**Author:** [@bailop95](https://www.phphelp.com/u/bailop95)\
**Replies:** 2\
**Last updated:** [December 30, 2018, 5:32pm UTC](https://www.phphelp.com/t/select-data-from-mysql-and-use-result-as-variable-in-php/27967 "2018-12-30T17:32:33Z")

</div>

Im having trouble finding a solution to this. My code below is pulling data from MYSQL successfully. Where I have echoed $weight\[‘weight’\]." ";, this shows the correct data. As this data is a single piece (decimal number…

---

## [Missing row data](https://www.phphelp.com/t/missing-row-data/27417)

<div class="topic-metadata">

**Author:** [@bogaert-y](https://www.phphelp.com/u/bogaert-y)\
**Replies:** 1\
**Last updated:** [October 16, 2018, 1:45pm UTC](https://www.phphelp.com/t/missing-row-data/27417 "2018-10-16T13:45:30Z")

</div>

Hi all, strange thing I run an oracle sql query without errors (all error reporting is on): SELECT V\_FLIGHTS.FLT\_COM\_DEP\_BLK AS DOF, V\_FLIGHTS.lfc\_id AS OPERATOR, V\_FLIGHTS.Flt\_number AS FLT, V\_FLIGHTS.Flt\_apt\_iata\_co…

---

## [OCIFetch error?](https://www.phphelp.com/t/ocifetch-error/27360)

<div class="topic-metadata">

**Author:** [@bogaert-y](https://www.phphelp.com/u/bogaert-y)\
**Replies:** 1\
**Last updated:** [October 11, 2018, 2:27pm UTC](https://www.phphelp.com/t/ocifetch-error/27360 "2018-10-11T14:27:52Z")

</div>

Hi all, looking for some assistance! As I am new to this I do not have much experience with OCI data. I need to output some oracle sql data to a csv file however I get the error: ocifetch(): supplied resource is not …

---

## [Changing mysql to PDO](https://www.phphelp.com/t/changing-mysql-to-pdo/26993)

<div class="topic-metadata">

**Author:** [@Nightmaster](https://www.phphelp.com/u/Nightmaster)\
**Replies:** 1\
**Last updated:** [August 23, 2018, 1:33pm UTC](https://www.phphelp.com/t/changing-mysql-to-pdo/26993 "2018-08-23T13:33:48Z")

</div>

Hey all, I need to switch from mysqli to PDO lib, and what I managed to to is to connect to database and list existing entries, but when I’m trying to insert I’m having a problems. Here’s what I previously had in mysql…

---

## [Form not working... where is my code in error?](https://www.phphelp.com/t/form-not-working-where-is-my-code-in-error/26822)

<div class="topic-metadata">

**Author:** [@CliffRich](https://www.phphelp.com/u/CliffRich)\
**Replies:** 8\
**Last updated:** [August 14, 2018, 6:43pm UTC](https://www.phphelp.com/t/form-not-working-where-is-my-code-in-error/26822 "2018-08-14T18:43:00Z")

</div>

Ok so i have this form and it’s just returning a random 500 error… HELP! this is the submission form Form Test label,a { font-family : Arial, Helvetica, sans-serif; font-size : 12px; } Business N…

---

## [Select query returning false on sql server in PHP](https://www.phphelp.com/t/select-query-returning-false-on-sql-server-in-php/26779)

<div class="topic-metadata">

**Author:** [@phpbee](https://www.phphelp.com/u/phpbee)\
**Replies:** 2\
**Last updated:** [July 26, 2018, 1:36pm UTC](https://www.phphelp.com/t/select-query-returning-false-on-sql-server-in-php/26779 "2018-07-26T13:36:01Z")

</div>

I am using SQL(MSSQL) Server database on Windows Server. My database connection is working perfect. I am trying to get data using Select Query. Here is my code, db\_functions.php public function login($username, $passw…

---

## [PHP Problem with entering non-unicode characters into SQL Server](https://www.phphelp.com/t/php-problem-with-entering-non-unicode-characters-into-sql-server/26755)

<div class="topic-metadata">

**Author:** [@Aravil1](https://www.phphelp.com/u/Aravil1)\
**Replies:** 2\
**Last updated:** [July 23, 2018, 6:25pm UTC](https://www.phphelp.com/t/php-problem-with-entering-non-unicode-characters-into-sql-server/26755 "2018-07-23T18:25:08Z")

</div>

Good evening, When I try to enter Polish characters (like ę, ą, ó and so on) into SQL Server via PHP, I get “strange” characters insterted instead of correct ones. Column is NVARCHAR and collation is POLISH\_CI\_AS and bo…

[Next page](https://www.phphelp.com/c/general-database-oracle-sql-server-etc/7.md?page=1)
