LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

422 solutions found in database

Page 10 of 22
0 votes
1 ans
3 views
Which ORM should I use for Node.js and MySQL?

I'm rewriting a project to use Node.js. I'd like to keep using MySQL as the DB (even though I don't mind rewriting the schema). I'm looking for...

database Solved
NE
asked 1 month ago by Near Privman
0 votes
1 ans
3 views
ROW_NUMBER() in MySQL

Is there a nice way in MySQL to replicate the SQL Server function `ROW_NUMBER()`? For example: SELECT col1, col2, ROW_NUMBER() OVE...

database Solved
PA
asked 1 month ago by Paul
0 votes
1 ans
3 views
Passing an array to a query using a WHERE clause

Given an array of ids `$galleries = array(1,2,5)` I want to have a SQL query that uses the values of the array in its WHERE clause like: <!-- language: la...

database Solved
QU
asked 1 month ago by Quinn
0 votes
1 ans
3 views
mysqli or PDO - what are the pros and cons?

In our place we're split between using mysqli and PDO for stuff like prepared statements and transaction support. Some projects use one, some the other. The...

database Solved
PO
asked 1 month ago by Polsonby
0 votes
1 ans
3 views
"Incorrect string value" when trying to insert UTF-8 into MySQL via JDBC?

This is how my connection is set: `Connection conn = DriverManager.getConnection(url + dbName + "?useUnicode=true&characterEncoding=utf-8", use...

database Solved
LI
asked 1 month ago by Lior
0 votes
1 ans
3 views
How to perform a mysqldump without a password prompt?

I would like to know the command to perform a mysqldump of a database without the prompt for the password. REASON: I would like to run a cron job, which tak...

database Solved
PR
asked 1 month ago by Prakash Raman
0 votes
1 ans
3 views
How to determine which database is selected

Is there any way to later output the name of the database that is currently selected?

database Solved
AN
asked 1 month ago by andrewtweber
0 votes
1 ans
3 views
mysql update column with value from another table

I have two tables, both looking like id name value =================== 1 Joe 22 2 Derk 30 I need to copy the value of `va...

database Solved
LE
asked 1 month ago by LeoSam
0 votes
1 ans
3 views
Does MySQL index foreign key columns automatically?

Does MySQL index foreign key columns automatically?

database Solved
D&
asked 1 month ago by Dónal
0 votes
1 ans
3 views
What MySQL data type should be used for Latitude/Longitude with 8 decimal places?

I'm working with map data, and the `Latitude/Longitude` extends to 8 decimal places. For example: Latitude 40.71727401 Longitude -74.00898606...

database Solved
ED
asked 1 month ago by Edward
0 votes
1 ans
3 views
How to copy a row and insert in same table with a autoincrement field in MySQL?

In MySQL I am trying to copy a row with an **autoincrement** `column ID=1` and **insert** the data into same table as a new row with `column ID=2`. How can I...

database Solved
NA
asked 1 month ago by Navdroid
0 votes
1 ans
3 views
MySQL SELECT only not null values

Is it possible to do a select statement that takes only NOT NULL values? Right now I am using this: SELECT * FROM table And then I have to filter o...

database Solved
BR
asked 1 month ago by bryan sammon
0 votes
1 ans
3 views
com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

I'm working on getting my database to talk to my Java programs. Can someone give me a quick and dirty sample program using the JDBC? I'm getting a...

database Solved
JO
asked 1 month ago by Josh K
0 votes
1 ans
3 views
Comparison of full text search engine - Lucene, Sphinx, Postgresql, MySQL?

I'm building a Django site and I am looking for a search engine. A few candidates: - Lucene/Lucene with Compass/Solr - Sphinx - Postgresql built...

database Solved
CO
asked 1 month ago by Continuation
0 votes
1 ans
3 views
What's faster, SELECT DISTINCT or GROUP BY in MySQL?

If I have a table CREATE TABLE users ( id int(10) unsigned NOT NULL auto_increment, name varchar(255) NOT NULL, profession varchar(2...

database Solved
VA
asked 1 month ago by vava
0 votes
1 ans
3 views
JSON encode MySQL results

How do I use the `json_encode()` function with MySQL query results? Do I need to iterate through the rows or can I just apply it to the entire results object?

database Solved
TR
asked 1 month ago by Trick Jarrett
0 votes
1 ans
3 views
MySQL: selecting rows where a column is null

I'm having a problem where when I try to select the rows that have a NULL for a certain column, it returns an empty set. However, when I look at the table i...

database Solved
TH
asked 1 month ago by The.Anti.9
0 votes
1 ans
3 views
MySQL show status - active or total connections?

When I run `show status like 'Con%'` it shows the number of connections, which is 9972 and constantly growing. Is this an active number of connections o...

database Solved
MI
asked 1 month ago by Michael
0 votes
1 ans
3 views
How can I modify the size of column in a MySQL table?

I have created a table and accidentally put `varchar` length as `300` instead of `65353`. How can I fix that? An example would be appreciated.

database Solved
VE
asked 1 month ago by vehomzzz
0 votes
1 ans
3 views
How to enable MySQL Query Log?

How do I enable the MySQL function that logs each SQL query statement received from clients and the time that query statement has submitted? Can I do that in p...

database Solved
FE
asked 1 month ago by Feng-Chun Ting