Category "mysql"

mysql_result is defined but mysql_free_result warns it expected a resource

This code tests to see if there was a result before freeing it up: $result = mysql_query($query) or die("$query\n\n" . mysql_error()); $id = mysql_insert_id();

New records since last query in MySQL View

I am looking for a way to create a View that when queried will automatically only retrieve new records since the last query. My tables have a timestamp field fo

removing strings from a wordpress database

Hey my Wordpress site has been hacked recently and I have no backup. So I need to revert the hack. the hack placed a link in almost every table and field in my

Failed to convert from type [java.lang.Object[]] to type

I have spring web app (JPA/Hibernate + MySQL). I have two DAO classes. CustomerDAO @Entity @Table(name = "customers") public class Customer { @Id @Column

How to get product details from Magento Database with mysql query?

I just want to know about how to get product details from magento database tables. I know how to run MySQL Query and get results from database. But the problem

Laravel Migration Error: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes

Migration error on Laravel 5.4 with php artisan make:auth [Illuminate\Database\QueryException]

Find duplicates in the same table in MySQL

I have a table with two columns - artist, release_id What query can I run to show duplicate records? e.g. my table is ArtistX : 45677 ArtistY : 378798 Artist

How to save php socket resource in database?

I am creating a socket in php with socket_create and would like to store the received socket in a database (to access from other php code). However the socket i

Debian 10 MariaDB 'Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)'

Good evening Community, I am in despair because I cannot install MariaDB on Debian10. There are similar Stackoverflow questions but none of them helped to solv

Detect emoticons in string

I found that you need PHP 7 and MySQL 5.5 to use emoticons in a string that you want to upload to the database. I don't have these specification on my server s

Using MySQL to Create a Login page in Visual Studio 2010

I am using Visual Studio 2010. I can connect to my MySQL datababse no problem by clicking my login button. Now I can't figure out how to query the database and

I want to make where clause inside to select DB::raw in laravel

I have two tables biodata_wni and demographics, I want to count data where column akta_kwn in biodata_wni has value 1 and also the count of akta_kwn in biodata_

Writing ISO8859 data to MySQL in R (error:"could not run statement: Invalid utf8 character string")

I need to import an SAS Transfer File (.xpt) to MySQL. Because I don't own SAS, I tried a) first importing the .xpt in R b) then using dbWriteTable from the li

Doctrine 2 mapping referencing unique key

Basic question: Is it possible to map an association using Doctrine referencing not a primary but only a unique key? Extended Version: I have an Entity (Part

MariaDB - Cannot connect to MariaDB instance from Dbeaver using correct password

I am trying to connect to a localhost instance of MariaDb on port 3306. I'm well aware that root cannot use localhost because of MariaDb specifications so I cre

Is current location within radius of items stored in a table?

I have a table that stores longitude / latitude / radius ( miles ) per row. What I am trying to figure out is how to select ONLY the rows that my current point

find server ip by sql

How can I get server ip (host) by a MySQL query? an sql like this: SELECT @@SERVERIP I want to connect to my db by netbeans, and I can't use 'localhost' for

How to use LOAD_FILE to load a file into a MySQL blob?

I tried to load a file into a MySQL blob (on a Mac). My query is INSERT INTO MyTable VALUES('7', LOAD_FILE('Dev:MonDoc.odt')) No error appears but the file

MySQL equivalent of Python's triple-quoted strings?

Using Python's triple-quoted strings I can define strings containing ', backticks, or " without having to care about it: hello = """ This strin

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given [duplicate]

I get this error whenever I run this: Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given The Code: $amn = mysql_q