Search found 194 matches
- Sat Feb 20, 2016 10:42 am
- Forum: SQL
- Topic: SQL subqueries 2 times.
- Replies: 1
- Views: 18204
SQL subqueries 2 times.
Hello, I have a query with twice the same sub-query. Is there a way to do it only once? The sub-query uses a value from the main-query. SELECT Bestel_id,klant.Klantnaam, (SELECT count(*) FROM bestellijn WHERE bestellijn.Bestel_id=bestelling.Bestel_id) AS total_products FROM bestelling,klant WHERE kl...
- Wed Jan 27, 2016 9:34 pm
- Forum: SQL
- Topic: Solved: Get average by month on a select.
- Replies: 1
- Views: 18373
Solved: Get average by month on a select.
Hi,
I have a table with date for every day.
But I want the average by month.
Is there a simple query that can do that,
Or do I have to calculate it on the application layer?
I have a table with date for every day.
But I want the average by month.
Is there a simple query that can do that,
Or do I have to calculate it on the application layer?
- Sun Nov 22, 2015 1:57 pm
- Forum: SQL
- Topic: Solved: How do I change the primary key of a table?
- Replies: 1
- Views: 22477
Solved: How do I change the primary key of a table?
I would like to change the primary key of a table,
But don't know how to do that.
Do I have to drop the table and recreate it?
I don't want to do that.
But don't know how to do that.
Do I have to drop the table and recreate it?
I don't want to do that.
- Mon Nov 16, 2015 7:12 pm
- Forum: MySQL
- Topic: 'events_stages_history' has the wrong structure
- Replies: 1
- Views: 26775
'events_stages_history' has the wrong structure
I get the following error messages in my log file ' /var/log/mysql/mysqld.err ' 2015-11-16 20:07:12 28575 [ERROR] Native table 'performance_schema'.'events_stages_summary_by_account_by_event_name' has the wrong structure 2015-11-16 20:07:12 28575 [ERROR] Native table 'performance_schema'.'events_sta...
- Fri Nov 06, 2015 4:50 pm
- Forum: SQL
- Topic: mysqld-bin files taking up much space
- Replies: 1
- Views: 19566
mysqld-bin files taking up much space
mysql.bin files taking up much space. I have a set of files that take up lots of space: -rw-rw----. 1 mysql mysql 38M Aug 12 17:42 mysqld-bin.000019 -rw-rw----. 1 mysql mysql 888K Aug 12 20:44 mysqld-bin.000020 -rw-rw----. 1 mysql mysql 143 Aug 12 20:56 mysqld-bin.000021 -rw-rw----. 1 mysql mysql 14...
- Thu Oct 01, 2015 6:57 pm
- Forum: PHP
- Topic: SOLVED: preg_match find last word of a string
- Replies: 2
- Views: 21534
Re: preg_match find last word of a string
Thanks a lot
- Mon Aug 31, 2015 3:54 pm
- Forum: SQL
- Topic: Selecting rows where a column is NULL
- Replies: 1
- Views: 21768
Selecting rows where a column is NULL
I'm having a problem when I try to select the rows that have a NULL for a column.
None is working...
What am I doing wrong?
Code: Select all
SELECT * FROM database WHERE column = NULL;
SELECT * FROM database WHERE column = 'NULL';
What am I doing wrong?
- Fri Aug 21, 2015 9:18 pm
- Forum: PHP
- Topic: SOLVED: preg_match find last word of a string
- Replies: 2
- Views: 21534
SOLVED: preg_match find last word of a string
Hi,
I want to use preg_match() too find the last word of a string:
I already have this:
but it doesn't work
I want to use preg_match() too find the last word of a string:
I already have this:
Code: Select all
$content='just a string';
$pattern = '/[\w]+$/';
preg_match($pattern, $content, $result);
echo $result[0];
- Fri Aug 21, 2015 9:16 pm
- Forum: PHP
- Topic: clear array from values
- Replies: 2
- Views: 21959
Re: clear array from values
Thanks, I'll test it
- Wed Aug 12, 2015 7:16 pm
- Forum: Apache
- Topic: apache2: Could not reliably determine the server's fully qua
- Replies: 1
- Views: 27684
apache2: Could not reliably determine the server's fully qua
Hi,
I get the following error message in my log,
It has no impact, but how do I get rid of it?
I get the following error message in my log,
Code: Select all
apache2: Could not reliably determine the server's fully qualified domain name,