mysql

Connect to remote mysql in Ubuntu terminal

Error when connecting to a remote mysql database. I am trying to connect to Ubuntu via the console utility "mysql". In the fu ... meta_desc','meta_keys','0','0','0','0','1','6','1','','0','pagetitle','','com_content_read.tpl'); EOF The answer is the same

How to get data from MySQL using PHP?

There is a table news with 5 fields id, text, title, author, date. You need to display this data on the page. I can't do it i ... soc($news, MYSQL_ASSOC)) { foreach ($row as $col_value) { print "\t\t<td>$col_value</td>\n"; } }

Chat in PHP

I need to write a chat in php, please help me! I was given the task to write a chat in php, I have never encountered this tas ... ite, as I imagine-I will do it on html forms... Thank you in advance to everyone who responds to help with advice or hints!

phpmyadmin doesn't want to log in

Hello. There was a problem with phpmyadmin the other day. And she came unexpectedly and unexpectedly. When logging in an erro ... wnload config.inc.php with exfile.ru I tried to replace the $dbuser variable with 'root'. But as it is, there are no results.

How do I compare a date with today's date in a MySQL query?

You need to compare the date with today or another specific date (for example -10 days) in the query itself to make a selecti ... date('Y-m-d',`date`)='".$date."'")); Writes an error: mysql_fetch_array() expects parameter 1 to be resource, boolean given

I can't understand what the Error Code: 1005 is related to. Can't create table (errno: 150 "Foreign key constraint is incorrectly formed")

CREATE TABLE IF NOT EXISTS `book_shop`.`Book` ( `ISBN_BOOK` VARCHAR(20) NOT NULL, `YEAR_BOOK` YEAR NULL, `TITLE_BOOK` VARCHAR ... de: 1005. Can't create table book_shop.shoppingbaskets_have_books (errno: 150 "Foreign key constraint is incorrectly formed")

Migrating a database from phpMyAdmin to MariaDB

Good day to all! Guys, you can't export and then import the database. I will describe the actions in Linux: Running phpMyAd ... yTable ERROR 1146 (42S02): Table 'myDB.myTable' doesn't exist Why can't he see the table in this database, if it is there?

Why does Laravel give an error when migrating from a foreign key?

When migrating (php artisan migrate) with a foreign-key, an error occurs: SQLSTATE[HY000]: General error: 1005 Can't crea ... he same migration and there are no errors. How to solve the problem with this a mistake? UPD: users table cities table

SQL query to remove duplicates from a table by one field

There is a table with duplicates in MySQL: (by the name field) id | name | surname -------------------- 1 | niko | surname ... table of this type id | name | surname -------------------- 1 | niko | surname 3 | jane | surname 5 | ivan | surname

MySQL error: You have an error in your SQL syntax

Recently I had to work with MySQL. I wrote this line in php: $query = "SELECT 'catalog' FROM $moduls WHERE posit = 'head'"; ... ear 'WHERE posit = 'head'' at line 1 I feel that the problem is with quotation marks, can you tell me exactly how to do it?

foreign keys in MariaDB

Hello there is a problem in phpadmin I have three tables student,group,student_to_group table student_to_group contains two f ... CONSTRAINT students_ibfk_1 FOREIGN KEY (id) REFERENCES students_to_group (student_id) ON DELETE CASCADE ON UPDATE NO ACTION)

Implementation of Mysql queries in a loop.

Good afternoon. The following task has developed: the script is passed about 60 variables, they need to be sorted from the ta ... sts then from the already selected fields that the first one returned the query is sorted by the second variable, and so on.

PyMySQL how to make an insert?

Here is the code of my parser #Парсер v2 import requests from bs4 import BeautifulSoup import pymysql.cursors def get_ ... autocommit=True) print ("connect successful!!") How to implement data from parsing to automatically do insert

How do I SELECT "dishes" by "ingredients"?

There is a table with "dishes" and their "ingredients": id title ingr 1 яичница яйца 2 ... ith the same ingredients? Input data: ['яйца', 'соль'] Output: ['яичница', 'соль с яйцами'] Http://sqlfiddle.com/#!7/386f1/3

What is the Mysql connection type?

There is a Types table: ID NAME 1 w 2 d 3 f Where ID is AUTOINCREMENT There is another USER_TYPE table that has this str ... le. It can be argued that the relationship between the Types tables and the USER_TYPE table is one - to-many? or many to one?

How do I completely remove a MySQL server from my computer?

At first, there were such problems. Now I have a mess with the MySQL accounts. How do I COMPLETELY delete a MySQL server? Whe ... delete everything: the program, the accounts, and the ports? As if MySQL Server did not stand at me? (I have Windows XP SP3.)

MySQL Double Sorting

Good afternoon, everyone. Faced with the task of having to do a double sort. I found a way. SELECT * FROM `firms` ORDER BY `i ... Petersburg would be output and all the others the values were sorted alphabetically. How can I write a similar query in Mysql

Mysqli output

Tell me how to output the record? I'm new to MySQLi in mysql, I know it well) I looked at the syntax is almost the same, but ... ;"; while($user = mysqli_fetch_assoc($result)) { echo {$user['name']}; } ?> Tell me where the errors are) Thanks.

Adding an entry to MySQL via an html form

Hello! I'm trying to learn the language PHP. Slowed down on adding an entry to the MySQL via the html - form. There is a htm ... was added to the database db table dannye in the field Pole1, and so on until the "Field 4"button. But this is not happening.

"The interlocutor prints the message" Online Chat (Web)

Dear # Hashcoders =) here I am faced with a situation that now I have 21: 46,and I do not know what to do, I am interested in ... th you. For example, I added a screenshot, I understand that "Mail.Ru Agent" it's not WEB, but just so you know what I mean.