Select rows from database by strlen

MySQL
Is there a way to select database table rows where a given value is a certain length, for example, less than 5 chars long? In PHP that would be strle...
10 months ago

mysql select where field = max(date) and group by

MySQL
I have the following query. I'd need to pick only the oldest rows (by DATE column). keeping my conditions (where and group by) SELECT table.* from ...
10 months ago

how to store all facebook emoji in mysql database

MySQL
I am using Emoji character in my project for facebook post. Some emoji character are saved good but some characters are saved like (??) into mysql dat...
10 months ago

Can I populate Session Variable with a query result?

MySQL
Is populating PHP session variables with a query result possible - if so, what is the proper syntax? My code:- session_start(); while($rows=mysql_fet...
10 months ago

Moving from Relational Database to Big Data

MySQL
Currently I have an application hosted on the Google Cloud Platform that offers web analytics and provides session activity (clicks, downloads etc) an...
10 months ago

searching 2 input fields PHP MySQL

MySQL
this is my index page where the search fields are in. index.php <form method="post" action="search.php?go" id="searchform"> &...
10 months ago

Modify an array by reference

MySQL
I receive from my MySQL database a multidimensional array Array ( [0] => Array ( [page] => categorypropose [value] => b...
10 months ago

If a row from JOIN table, do not exist, Nothing echo (MySQL)

MySQL
Confusing title right? Let me explain: Here is the code: SELECT tmdb_movies.movie_title ,GROUP_CONCAT(DISTINCT videos.videos_name) as videos_name FR...
10 months ago

How to use a variable as table name at the time of create table query in MySQL?

MySQL
I have a variable that takes the value from previous page, and I want to use that value as my table name. The value passes is an integer so therefore ...
10 months ago

Changing date format coming from database?

MySQL
So i am busy with coding a program though the date format is Y-m-d but i need it to be the european date format. thus having to be d-m-Y but i do not ...
10 months ago

PDOException: could not find driver when using phpunit

MySQL
I am starting to use laravel 4 and I am trying to start using unit tests so I can make my live easier. Well as all of you will guess my development ha...
10 months ago

Mysql Ranking within grouped results

MySQL
I have read posts that answer how to rank results in mysql, but my question is how to assign ranks within a group Let me explain with an example Dat...
10 months ago

Finding the sum of a given number

MySQL
I need help, for example the given number is 55 and I want to find out on how many 10's there are, (therefore in 55 there are five 10's) and in the pr...
10 months ago

Best place to use MySqlHelper.EscapeString

MySQL
Is it normal practice to use the MySqlHelper.EscapeString in a class constructor to remove any unwanted characters? Or are their better alternative...
10 months ago

Select Query From SQL group by weekly reports

MySQL
I used the following query to select group by records. SELECT YEARWEEK(dtentered) week, sum(leftcount) as lct, sum(rightcount) as rct FROM `dailycou...
10 months ago

Refining MySQL select query using UNION and DISTINCT

MySQL
I have a query in my php script that's not returning the desired data. The query is select distinct require_category from users_require which retu...
10 months ago

MYSQL Error : SQLSTATE[42000]: Syntax error or access violation: 1248 Every derived table must have its own alias

MySQL
Can anyone tell me why i keep getting an error with this sql query ? select hour , price , date from ( ...
10 months ago

MySQL - Where Issues with Entity Framework

MySQL
This query is work. string value = null; var temp1 = (from d in db.Device where (value ...
10 months ago

Codeigniter - update query executed successfully but $this->db->affected_rows() returns false

MySQL
I am working on a Codeigniter based web project where i need to update a user from admin panel. It works correctly if the updated value is different f...
10 months ago

Connecting Two Items in a Database - Best method?

MySQL
In a MySQL Database, I have two tables: Users and Items The idea is that Users can create as many Items as they want, each with unique IDs, and they ...
10 months ago