LMSouq

Knowledge Base

Browse Moodle Solutions

Clear

2110 solutions found in plugin-api

Page 33 of 106
0 votes
2 ans
28 views
Laravel-5 'LIKE' equivalent (Eloquent)

I'm using the below code to pull some results from the database with Laravel 5. BookingDates::where('email', Input::get('email'))-&gt...

php-dev Solved
V4
asked 5 months ago by V4n1ll4
0 votes
3 ans
28 views
Are table names in MySQL case sensitive?

Are table names in MySQL case sensitive? On my Windows development machine the code I have is able to query my tables which appear to be all lowercase. When...

database Solved
BE
asked 5 months ago by benstpierre
0 votes
1 ans
28 views
Escaping single quote in PHP when inserting into MySQL

I have a perplexing issue that I can't seem to comprehend... I have two SQL statements: - The first enters information from a form into the database....

database Solved
SJ
asked 5 months ago by sjw
0 votes
3 ans
30 views
How do you uninstall MySQL from Mac OS X?

I accidentally installed the PowerPC version of MySQL on my Intel Mac in Snow Leopard, and it installed without a problem but of course doesn't run properly...

database Solved
JO
asked 5 months ago by Joseph Ravenwolfe
0 votes
1 ans
30 views
Check if MySQL table exists without using "select from" syntax?

Is there a way to check if a table exists *without* selecting and checking values from it? That is, I know I can go `SELECT testcol FROM testtable` and check...

database Solved
BE
asked 5 months ago by Ben
0 votes
3 ans
31 views
How to use MySQL DECIMAL?

I can't quite get a grasp of MySQL's DECIMAL. I need the row to be able to contain a number anywhere from 00.0001 to 99.9999. How would I structure it t...

database Solved
CH
asked 5 months ago by Charles Zink
0 votes
1 ans
30 views
How to properly create composite primary keys - MYSQL

Here is a gross oversimplification of an intense setup I am working with. `table_1` and `table_2` both have auto-increment surrogate primary keys as the ID. `in...

database Solved
FI
asked 5 months ago by filip
0 votes
3 ans
27 views
Detect if value is number in MySQL

Is there a way to detect if a value is a number in a MySQL query? Such as SELECT * FROM myTable WHERE isANumber(col1) = true

database Solved
UR
asked 5 months ago by Urbycoz
0 votes
3 ans
31 views
Return 0 if field is null in MySQL

In MySQL, is there a way to set the "total" fields to zero if they are NULL? Here is what I have: SELECT uo.order_id, uo.order_total, uo.ord...

database Solved
KE
asked 5 months ago by Kevin
0 votes
2 ans
31 views
How to post query parameters with Axios?

I am trying to post on an API with some query params. This is working on PostMan / Insomnia when I am trying to by passing mail and firstname as query paramete...

database Solved
GU
asked 5 months ago by GuillaumeRZ
0 votes
1 ans
30 views
Reset MySQL root password using ALTER USER statement after install on Mac

I recently installed MySQL and it seems I have to reset the password after install. It won't let me do anything else. Now I already reset the password th...

database Solved
DE
asked 5 months ago by dengar81
0 votes
3 ans
27 views
If table exists drop table then create it, if it does not exist just create it

I'm stumped, I don't know how to go about doing this. Basically I just want to create a table, but if it exists it needs to be dropped and re-created...

general-dev Solved
GE
asked 5 months ago by George
0 votes
1 ans
28 views
Datetime equal or greater than today in MySQL

What's the best way to do following: SELECT * FROM users WHERE created >= today; Note: created is a datetime field.

database Solved
N0
asked 5 months ago by n00b
0 votes
2 ans
22 views
Access Denied for User 'root'@'localhost' (using password: YES) - No Privileges?

I am continuously receiving this error. I am using mySQL Workbench and from what I am finding is that root's schema privileges are null. There are no pri...

general-dev Solved
CH
asked 5 months ago by Chase
0 votes
3 ans
30 views
PHP PDO: charset, set names?

I had this previously in my normal mysql_* connection: mysql_set_charset("utf8",$link); mysql_query("SET NAMES 'UTF8'");...

php-dev Solved
KA
asked 5 months ago by Karem
0 votes
2 ans
29 views
MySQL select where column is not empty

In MySQL, can I select columns only where something exists? For example, I have the following query: select phone, phone2 from jewishyellow.user...

database Solved
MI
asked 5 months ago by mike
0 votes
1 ans
22 views
Using column alias in WHERE clause of MySQL query produces an error

The query I'm running is as follows, however I'm getting this error: > \#1054 - Unknown column 'guaranteed_postcode' in 'IN/ALL/ANY subq...

database Solved
JA
asked 5 months ago by James
0 votes
3 ans
29 views
WHERE vs HAVING

Why do you need to place columns you create yourself (for example `select 1 as "number"`) after `HAVING` and not `WHERE` in MySQL? And are there an...

general-dev Solved
BA
asked 5 months ago by baloo
0 votes
1 ans
32 views
Is the primary key automatically indexed in MySQL?

Do you need to explicitly create an index, or is it implicit when defining the primary key? Is the answer the same for MyISAM and InnoDB?

database Solved
AL
asked 5 months ago by Alex Miller
0 votes
1 ans
22 views
phpMyAdmin - Error > Incorrect format parameter?

I have a WordPress production website. I've exported the database by the following commands: `select database > export > custom > select all tab...

php-dev Solved
HE
asked 5 months ago by Henry