LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

378 solutions found in general-dev

Page 6 of 19
0 votes
1 ans
3 views
Using "like" wildcard in prepared statement

I am using prepared statements to execute mysql database queries. And I want to implement a search functionality based on a keyword of sorts. For that I nee...

general-dev Solved
SS
asked 1 month ago by ssn
0 votes
1 ans
3 views
On duplicate key ignore?

I'm trying to finish this query; my tag field is set to UNIQUE and I simply want the database to ignore any duplicate tag. INSERT INTO table_tags (t...

general-dev Solved
CO
asked 1 month ago by CodeChap
0 votes
1 ans
3 views
Copy values from one column to another in the same table

How can I make a copy values from one column to another? I have: Database name: list ------------------- number | test --------------...

general-dev Solved
LU
asked 1 month ago by Lucas
0 votes
1 ans
3 views
Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='

Error message on MySql: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=' I have gone thro...

general-dev Solved
MA
asked 1 month ago by Manatax
0 votes
1 ans
3 views
Access denied for user 'root@localhost' (using password:NO)

I'm trying to run WordPress in my Windows desktop and it needs MySQL. I install everything with `Web Platform Installer` which is provided by Microsoft....

general-dev Solved
NA
asked 1 month ago by Nasser Hadjloo
0 votes
1 ans
3 views
1030 Got error 28 from storage engine

I am working on a project where i need to create a database with 300 tables for each user who wants to see the demo application. it was working fine but today w...

general-dev Solved
SC
asked 1 month ago by ScoRpion
0 votes
2 ans
3 views
Set NOW() as Default Value for datetime datatype?

I have two columns in table users namely `registerDate and lastVisitDate` which consist of datetime data type. I would like to do the following. 1. Set regi...

general-dev Solved
IB
asked 1 month ago by Ibrahim Azhar Armar
0 votes
1 ans
3 views
"where 1=1" statement

> **Possible Duplicate:** > [Why would someone use WHERE 1=1 AND <conditions> in a SQL clause?](https://stackoverflow.com/questions/242822...

general-dev Solved
ME
asked 1 month ago by Mellon
0 votes
1 ans
3 views
Copy table without copying data

CREATE TABLE foo SELECT * FROM bar copies the table `foo` and duplicates it as a new table called `bar`. How can I copy the schema of `foo` to a new t...

general-dev Solved
MA
asked 1 month ago by Matthew
0 votes
1 ans
3 views
LEFT JOIN only first row

I read many threads about getting only the first row of a left join, but, for some reason, this does not work for me. Here is my structure (simplified of cou...

general-dev Solved
KD
asked 1 month ago by KddC
0 votes
1 ans
3 views
On Duplicate Key Update same as insert

I've searched around but didn't find if it's possible. I've this MySQL query: INSERT INTO table (id,a,b,c,d,e,f,g) VALUES (1,2,3,4,5,6...

general-dev Solved
RO
asked 1 month ago by Roy
0 votes
1 ans
3 views
Format number to 2 decimal places

I would like to know how can I output a number with 2 decimal places, without rounding the original number. For example: 2229,999 -> 2229,99 I a...

general-dev Solved
TE
asked 1 month ago by Tenza
0 votes
1 ans
3 views
GROUP_CONCAT comma separator

I have a query where I am using `GROUP_CONCAT` and a custom separator as my results may contain commas: '----' This all works well, however it is sti...

general-dev Solved
US
asked 1 month ago by user984580
0 votes
1 ans
3 views
Best practice multi language website

I've been struggling with this question for quite some months now, but I haven't been in a situation that I needed to explore all possible options befor...

general-dev Solved
JO
asked 1 month ago by Joshua - Pendo
0 votes
1 ans
3 views
#1273 - Unknown collation: 'utf8mb4_unicode_ci' cPanel

I have a WordPress database on my local machine that I want to transfer to a hosted phpMyAdmin on cPanel. However, when I try to import the database into the en...

general-dev Solved
WA
asked 1 month ago by Wairimu Murigi
0 votes
1 ans
3 views
PDO get the last ID inserted

I have a query, and I want to get the last ID inserted. The field ID is the primary key and auto incrementing. I know that I have to use this statement:...

general-dev Solved
WI
asked 1 month ago by William Kinaan
0 votes
1 ans
3 views
automatically insert auto increment primary key and values into existing table

I am trying to alter a table which has no primary key nor auto_increment column. I know how to add an auto increment primary key column. I already have 500 r...

general-dev Solved
FL
asked 1 month ago by FlyingCat
0 votes
1 ans
3 views
How to update column with null value

I am using mysql and need to update a column with a null value. I have tried this many different ways and the best I have gotten is an empty string. Is there...

general-dev Solved
JI
asked 1 month ago by jim
0 votes
1 ans
3 views
How to change the default collation of a table?

create table check2(f1 varchar(20),f2 varchar(20)); creates a table with the default collation `latin1_general_ci`; alter table check2 collate lat...

general-dev Solved
SI
asked 1 month ago by simplfuzz
0 votes
1 ans
3 views
GROUP_CONCAT ORDER BY

I've [a table][1] like: +-----------+-------+------------+ | client_id | views | percentage | +-----------+-------+------------+ |...

general-dev Solved
RO
asked 1 month ago by ronquiq