# MySQL database

**URL:** https://www.phphelp.com/c/mysql-database/6.md?page=4

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

**Page:** 5

---

## [Mysql cluster connection with php](https://www.phphelp.com/t/mysql-cluster-connection-with-php/32532)

<div class="topic-metadata">

**Author:** [@tariqmasood](https://www.phphelp.com/u/tariqmasood)\
**Replies:** 1\
**Last updated:** [September 18, 2020, 3:41pm UTC](https://www.phphelp.com/t/mysql-cluster-connection-with-php/32532 "2020-09-18T15:41:07Z")

</div>

I have created Innodb cluster environment of mysql Ver 8.0.21 on Linux x86\_64 LTS with 1 Read / Write, 2 read only nodes and mysql router for load balancing and performance. Read / Write ports are 6446 and read only port…

---

## [ORDER BY question\_id ASC with WHERE](https://www.phphelp.com/t/order-by-question-id-asc-with-where/32494)

<div class="topic-metadata">

**Author:** [@Eltik](https://www.phphelp.com/u/Eltik)\
**Replies:** 1\
**Last updated:** [September 9, 2020, 4:23am UTC](https://www.phphelp.com/t/order-by-question-id-asc-with-where/32494 "2020-09-09T04:23:03Z")

</div>

Hello. I seem to have an issue where adding an ORDER BY clause with a WHERE clause removes everything completely and I get nothing. I am confused since I am using a statement: SELECT \* FROM forum\_answer WHERE question\_i…

---

## [Operator in WHERE clause from variable](https://www.phphelp.com/t/operator-in-where-clause-from-variable/32475)

<div class="topic-metadata">

**Author:** [@vicsyr](https://www.phphelp.com/u/vicsyr)\
**Replies:** 2\
**Last updated:** [September 8, 2020, 10:09am UTC](https://www.phphelp.com/t/operator-in-where-clause-from-variable/32475 "2020-09-08T10:09:46Z")

</div>

Hi PHP/Sql Guru’s! I am having difficulty updating values from a PHP for into MYSQL. my problem is that my WHERE clause picks the variable up with the PK up as a value to - (minus) something. Thus, I need to ignore t…

---

## [How to insert data into multiple tables using one form using PHP,Mysql](https://www.phphelp.com/t/how-to-insert-data-into-multiple-tables-using-one-form-using-php-mysql/32442)

<div class="topic-metadata">

**Author:** [@MohamedYanis](https://www.phphelp.com/u/MohamedYanis)\
**Replies:** 1\
**Last updated:** [August 26, 2020, 12:28pm UTC](https://www.phphelp.com/t/how-to-insert-data-into-multiple-tables-using-one-form-using-php-mysql/32442 "2020-08-26T12:28:11Z")

</div>

I want to insert a specialty in the “specialties” table and automatically insert it into the other “classesspecialties” table which links the two “classes” and “specialties” tables with the identifier of each table. this…

---

## [Phpmyadmin shows errors, but this works fine](https://www.phphelp.com/t/phpmyadmin-shows-errors-but-this-works-fine/32421)

<div class="topic-metadata">

**Author:** [@Pedroski55](https://www.phphelp.com/u/Pedroski55)\
**Replies:** 2\
**Last updated:** [August 24, 2020, 1:25am UTC](https://www.phphelp.com/t/phpmyadmin-shows-errors-but-this-works-fine/32421 "2020-08-24T01:25:53Z")

</div>

I have a little button on my webpage called “Show my score”. A student can click it, enter their class and student number and the term week. They can then see their attendance, their score this week, their total score so…

---

## [Php 5.2 to php 7.2](https://www.phphelp.com/t/php-5-2-to-php-7-2/32420)

<div class="topic-metadata">

**Author:** [@Aviator](https://www.phphelp.com/u/Aviator)\
**Replies:** 1\
**Last updated:** [August 21, 2020, 2:51pm UTC](https://www.phphelp.com/t/php-5-2-to-php-7-2/32420 "2020-08-21T14:51:55Z")

</div>

How do I upgrade this line to php 7.2 $link = mysql\_connect($mysql\_server, “ics”, “ics-server”) or die

---

## [Mysql 8 query problem](https://www.phphelp.com/t/mysql-8-query-problem/32391)

<div class="topic-metadata">

**Author:** [@act78723](https://www.phphelp.com/u/act78723)\
**Replies:** 2\
**Last updated:** [August 16, 2020, 5:54pm UTC](https://www.phphelp.com/t/mysql-8-query-problem/32391 "2020-08-16T17:54:45Z")

</div>

I have the following query which has died after running over an hour on my local mysql 8 server: UPDATE download LEFT JOIN lookup ON download.ip\_address between lookup.start AND lookup.end SET ref = ( SELECT lookup.…

---

## [Retrieval of IP's yields multiple rows](https://www.phphelp.com/t/retrieval-of-ips-yields-multiple-rows/32378)

<div class="topic-metadata">

**Author:** [@act78723](https://www.phphelp.com/u/act78723)\
**Replies:** 2\
**Last updated:** [August 14, 2020, 2:20pm UTC](https://www.phphelp.com/t/retrieval-of-ips-yields-multiple-rows/32378 "2020-08-14T14:20:16Z")

</div>

I’m trying to get an id for a row in a lookup table based on an ip address. All ip’s are stored as varbinaries. The lookup table has ip ranges (start and end) and countries associated with the range. When I run the follo…

---

## [Added a new insert to register, now users are not inserting](https://www.phphelp.com/t/added-a-new-insert-to-register-now-users-are-not-inserting/32322)

<div class="topic-metadata">

**Author:** [@Hexi](https://www.phphelp.com/u/Hexi)\
**Replies:** 13\
**Last updated:** [August 10, 2020, 6:25pm UTC](https://www.phphelp.com/t/added-a-new-insert-to-register-now-users-are-not-inserting/32322 "2020-08-10T18:25:06Z")

</div>

My register page was fully working but i needed a second table to update on my sql, but now my second table ( times ) creates something and not ( users and times ) upon sign up, here is what i added to my page that messe…

---

## [INET6\_NTOA/MySQL 8](https://www.phphelp.com/t/inet6-ntoa-mysql-8/32338)

<div class="topic-metadata">

**Author:** [@mariusd](https://www.phphelp.com/u/mariusd)\
**Replies:** 13\
**Last updated:** [August 9, 2020, 4:09pm UTC](https://www.phphelp.com/t/inet6-ntoa-mysql-8/32338 "2020-08-09T16:09:39Z")

</div>

Anyone knows how to enable INET6\_NTOA in mysql 8 ? I just upgraded to 8 version and php 7.4 only to use the in-built function for ipv6… but i get that the function is not defined… isnt activated out of the box or someth…

---

## [Query problem with mysql ver. 8](https://www.phphelp.com/t/query-problem-with-mysql-ver-8/32305)

<div class="topic-metadata">

**Author:** [@mariusd](https://www.phphelp.com/u/mariusd)\
**Replies:** 8\
**Last updated:** [August 9, 2020, 3:46pm UTC](https://www.phphelp.com/t/query-problem-with-mysql-ver-8/32305 "2020-08-09T15:46:06Z")

</div>

After upgrading to MySQL 8 some of my queries went all over the place. Some i’ve managed to fix but there is 1 that is giving me a very hard time and i don’t know how or what to do to find out what is wrong. The query g…

---

## [How to download a BLOB image file](https://www.phphelp.com/t/how-to-download-a-blob-image-file/32333)

<div class="topic-metadata">

**Author:** [@historyglenn](https://www.phphelp.com/u/historyglenn)\
**Replies:** 2\
**Last updated:** [August 7, 2020, 10:30am UTC](https://www.phphelp.com/t/how-to-download-a-blob-image-file/32333 "2020-08-07T10:30:14Z")

</div>

Uploading and displaying BLOB image files is not an issue - that works perfectly. However, I need code to enable me to download the BLOB data as a stand-alone viewable jpg file.

---

## [How to make an advanced search based on the dates?](https://www.phphelp.com/t/how-to-make-an-advanced-search-based-on-the-dates/32271)

<div class="topic-metadata">

**Author:** [@mohamad](https://www.phphelp.com/u/mohamad)\
**Replies:** 10\
**Last updated:** [July 31, 2020, 3:04pm UTC](https://www.phphelp.com/t/how-to-make-an-advanced-search-based-on-the-dates/32271 "2020-07-31T15:04:10Z")

</div>

Dear All, I have stored my dates as a text in database (MySQL). I want to make an advanced search for users so that users can select from a calendar their targeted date as start\_time and also they can select from a cal…

---

## [PHP Warning: mysqli\_fetch\_row() expects parameter 1 to be mysqli\_result, boolean](https://www.phphelp.com/t/php-warning-mysqli-fetch-row-expects-parameter-1-to-be-mysqli-result-boolean/32229)

<div class="topic-metadata">

**Author:** [@dmanghani](https://www.phphelp.com/u/dmanghani)\
**Replies:** 9\
**Last updated:** [July 31, 2020, 5:42am UTC](https://www.phphelp.com/t/php-warning-mysqli-fetch-row-expects-parameter-1-to-be-mysqli-result-boolean/32229 "2020-07-31T05:42:07Z")

</div>

Unable to trouble shoot can anybody help please. Thanks

---

## [Trying to connect to MySQL for the first time](https://www.phphelp.com/t/trying-to-connect-to-mysql-for-the-first-time/32246)

<div class="topic-metadata">

**Author:** [@Rally](https://www.phphelp.com/u/Rally)\
**Replies:** 2\
**Last updated:** [July 22, 2020, 4:17am UTC](https://www.phphelp.com/t/trying-to-connect-to-mysql-for-the-first-time/32246 "2020-07-22T04:17:06Z")

</div>

I am tring to connect to my database. I am using xampp with PhPmyadmin. (v 4.9.0.1) I read a help page ( https://www.homeandlearn.co.uk/php/php12p4.html ) which had some code to check if you are connecting to MySQL. an…

---

## [Timesheet](https://www.phphelp.com/t/timesheet/32216)

<div class="topic-metadata">

**Author:** [@rbleil](https://www.phphelp.com/u/rbleil)\
**Replies:** 5\
**Last updated:** [July 20, 2020, 2:27pm UTC](https://www.phphelp.com/t/timesheet/32216 "2020-07-20T14:27:23Z")

</div>

I am trying to add a clock in/clock out function to my database project. I currently have a main form that the employee is directed to upon login. What I would like to accomplish is the ability to insert int the databa…

---

## [Using phpMyAdmin 'Export' and 'Import' to Move a Database to New Computer](https://www.phphelp.com/t/using-phpmyadmin-export-and-import-to-move-a-database-to-new-computer/32198)

<div class="topic-metadata">

**Author:** [@Len\_Jacobson](https://www.phphelp.com/u/Len_Jacobson)\
**Replies:** 13\
**Last updated:** [July 10, 2020, 10:09pm UTC](https://www.phphelp.com/t/using-phpmyadmin-export-and-import-to-move-a-database-to-new-computer/32198 "2020-07-10T22:09:12Z")

</div>

I have used the phpMyAdmin Export/Import functions many, many times to move a MySQL database from one computer to another. It has always worked beautifully and very simply. I have a new computer to which I want to move…

---

## [Order By multiple cols](https://www.phphelp.com/t/order-by-multiple-cols/32174)

<div class="topic-metadata">

**Author:** [@mariusd](https://www.phphelp.com/u/mariusd)\
**Replies:** 5\
**Last updated:** [July 4, 2020, 1:43pm UTC](https://www.phphelp.com/t/order-by-multiple-cols/32174 "2020-07-04T13:43:37Z")

</div>

I’m trying to do an orderby with multiple columns and for some reason doesn’t like the fact that i want 2 of them in ASC and one in DESC why could that be ? “ORDER BY rst, sticky ASC, id DESC” the first 2 to be asc an…

---

## [Php m](https://www.phphelp.com/t/php-m/32119)

<div class="topic-metadata">

**Author:** [@cuuky](https://www.phphelp.com/u/cuuky)\
**Replies:** 1\
**Last updated:** [June 22, 2020, 11:18am UTC](https://www.phphelp.com/t/php-m/32119 "2020-06-22T11:18:36Z")

</div>

Hey, I’ve been running into an error with php and mysql and I don’t know why… Code: $statement = $connection-\>prepare(“SELECT online.lastip,online.timestamp FROM online WHERE online.license=?”); if (!$statement) { …

---

## [How to sum time in MySQL(by a query)?](https://www.phphelp.com/t/how-to-sum-time-in-mysql-by-a-query/32096)

<div class="topic-metadata">

**Author:** [@mohamad](https://www.phphelp.com/u/mohamad)\
**Replies:** 2\
**Last updated:** [June 19, 2020, 6:19am UTC](https://www.phphelp.com/t/how-to-sum-time-in-mysql-by-a-query/32096 "2020-06-19T06:19:19Z")

</div>

Dear all, I want to sum a column (duration) by a query statement. For example, 1:42:00, 2:53:00, 4:12:00 , … When I use this query (sum(duration)), it gives me a number. But it is not exact, I guess it is a INT. How to…

---

## [MySQL Function PASSWORD() To Be Deprecated](https://www.phphelp.com/t/mysql-function-password-to-be-deprecated/32034)

<div class="topic-metadata">

**Author:** [@Len\_Jacobson](https://www.phphelp.com/u/Len_Jacobson)\
**Replies:** 8\
**Last updated:** [June 12, 2020, 3:56pm UTC](https://www.phphelp.com/t/mysql-function-password-to-be-deprecated/32034 "2020-06-12T15:56:03Z")

</div>

Apparently, the MySQL function, PASSWORD(), is to be deprecated in a future release of MySQL. The dev.MySQL.com website has a write-up at https://dev.mysql.com/worklog/task/?id=6409. That write-up speaks only of the PA…

---

## [How to delete rows](https://www.phphelp.com/t/how-to-delete-rows/32036)

<div class="topic-metadata">

**Author:** [@ketanco](https://www.phphelp.com/u/ketanco)\
**Replies:** 0\
**Last updated:** [June 11, 2020, 6:33pm UTC](https://www.phphelp.com/t/how-to-delete-rows/32036 "2020-06-11T18:33:36Z")

</div>

I want to delete from: the table called wp\_options, only the rows where the column “option\_name” contains the word “wp\_session” (not necessarily equal, but contains that), and with the column “option\_id” between 5000 …

---

## [How to get the PW in the right place](https://www.phphelp.com/t/how-to-get-the-pw-in-the-right-place/31899)

<div class="topic-metadata">

**Author:** [@Pedroski55](https://www.phphelp.com/u/Pedroski55)\
**Replies:** 6\
**Last updated:** [June 11, 2020, 8:34am UTC](https://www.phphelp.com/t/how-to-get-the-pw-in-the-right-place/31899 "2020-06-11T08:34:51Z")

</div>

I take the column number, then password\_hash($number). I want the PW in the same row, but it goes to the bottom. I can export it as csv, put them in the right place, but that is not ideal. I tried WHERE id = $id Maybe…

---

## [Help with Error updating record:](https://www.phphelp.com/t/help-with-error-updating-record/31908)

<div class="topic-metadata">

**Author:** [@RandalThor](https://www.phphelp.com/u/RandalThor)\
**Replies:** 5\
**Last updated:** [May 22, 2020, 12:10pm UTC](https://www.phphelp.com/t/help-with-error-updating-record/31908 "2020-05-22T12:10:10Z")

</div>

Hellow i am very new to php and i’m trying to do a project. I am getting this error: “Error updating record: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the …

---

## [PHP combo box highlight option correlating with data selected](https://www.phphelp.com/t/php-combo-box-highlight-option-correlating-with-data-selected/31896)

<div class="topic-metadata">

**Author:** [@ciresuark](https://www.phphelp.com/u/ciresuark)\
**Replies:** 1\
**Last updated:** [May 20, 2020, 1:15am UTC](https://www.phphelp.com/t/php-combo-box-highlight-option-correlating-with-data-selected/31896 "2020-05-20T01:15:47Z")

</div>

I have a form gathering data from the database. There is one field ‘country’ which is a combo box. I have the combo box populated from the countries table which joins the customers table to provide the country specific t…

---

## [Need help with mysql trigger](https://www.phphelp.com/t/need-help-with-mysql-trigger/31881)

<div class="topic-metadata">

**Author:** [@act78723](https://www.phphelp.com/u/act78723)\
**Replies:** 0\
**Last updated:** [May 17, 2020, 4:40pm UTC](https://www.phphelp.com/t/need-help-with-mysql-trigger/31881 "2020-05-17T16:40:16Z")

</div>

I’m trying to create a trigger that does two things, first take an ip that’s in dot notation and run inet\_aton on it and put the result in another field. Second, checks a lookup table to identify an ip range that the res…

---

## [Can any body please help with coordinate thing?](https://www.phphelp.com/t/can-any-body-please-help-with-coordinate-thing/31814)

<div class="topic-metadata">

**Author:** [@Raiden900](https://www.phphelp.com/u/Raiden900)\
**Replies:** 2\
**Last updated:** [May 6, 2020, 8:34pm UTC](https://www.phphelp.com/t/can-any-body-please-help-with-coordinate-thing/31814 "2020-05-06T20:34:23Z")

</div>

Its been 5hours but I am just able to make this databse table Link-https://stackoverflow.com/questions/5152683/find-all-locations-near-to-my-gps-location

---

## [Struggling with user login](https://www.phphelp.com/t/struggling-with-user-login/31777)

<div class="topic-metadata">

**Author:** [@Kevin](https://www.phphelp.com/u/Kevin)\
**Replies:** 3\
**Last updated:** [May 4, 2020, 1:23am UTC](https://www.phphelp.com/t/struggling-with-user-login/31777 "2020-05-04T01:23:59Z")

</div>

Hello! I’m struggling with a php tutorial. This one to be specific: https://webdamn.com/build-helpdesk-system-with-php-mysql/ I created the tables in the DB, I add users, but it won’t let me login with them. I can’t fi…

---

## [Two quick questions RE: creating a table](https://www.phphelp.com/t/two-quick-questions-re-creating-a-table/31706)

<div class="topic-metadata">

**Author:** [@Deb](https://www.phphelp.com/u/Deb)\
**Replies:** 1\
**Last updated:** [April 24, 2020, 1:47pm UTC](https://www.phphelp.com/t/two-quick-questions-re-creating-a-table/31706 "2020-04-24T13:47:25Z")

</div>

I’m creating a table for the first time. The instructions I have are pretty clear, but I have two questions. Below are the table instructions. My question #1 is, for NOT NULL, I see two possible places. Once is a littl…

---

## [Putting large .txt files with a common delimiter separating the info into an SQL database](https://www.phphelp.com/t/putting-large-txt-files-with-a-common-delimiter-separating-the-info-into-an-sql-database/31478)

<div class="topic-metadata">

**Author:** [@HTT5041](https://www.phphelp.com/u/HTT5041)\
**Replies:** 2\
**Last updated:** [April 4, 2020, 9:48pm UTC](https://www.phphelp.com/t/putting-large-txt-files-with-a-common-delimiter-separating-the-info-into-an-sql-database/31478 "2020-04-04T21:48:49Z")

</div>

Hi! I have around 180GB of data that I need to put into a database, it is all in text files and the info is separated by a colon (Username:email). The files are around 300MB in size so I don’t really know how to go about…

[Previous page](https://www.phphelp.com/c/mysql-database/6.md?page=3)

[Next page](https://www.phphelp.com/c/mysql-database/6.md?page=5)
