Search found 197 matches

by chris
Fri Feb 09, 2018 9:52 pm
Forum: SQL
Topic: SOLVED: update query update from another table
Replies: 2
Views: 21367

Re: update query update from another table

Yes, you can with update:

here is an example:

Code: Select all

UPDATE update_table AS a, source_table AS b SET a.update_column=b.source_table WHERE a.id=b.id;
by chris
Sat Feb 03, 2018 9:25 pm
Forum: HTML
Topic: HTML CSS show li items in multiple columns
Replies: 1
Views: 19348

Re: HTML CSS show li items in multiple columns

You can use CSS and set inline-block ( with fixed width ) It will set the Li-element next to each other, and with fixed-width it will look like columns. li {display: inline-block; width:200px;} You can also play with the following in CSS, but the support depends on browser. columns: 2; -webkit-colum...
by chris
Tue Jan 30, 2018 8:44 pm
Forum: SQL
Topic: SOLVED : Drop table fails
Replies: 2
Views: 18103

Re: Drop table fails

The foreign key is actually on another table; Use this command to find it: SELECT * FROM information_schema.table_constraints WHERE constraint_schema = 'DATABASE_NAME' AND constraint_type = 'FOREIGN KEY' ; Once you find it, you can remove it on that table: ALTER TABLE other_table DROP FOREIGN KEY co...
by chris
Thu Jan 11, 2018 2:56 pm
Forum: Shell
Topic: SOLVED : Bash remove trailing digits
Replies: 2
Views: 17979

Re: Bash remove trailing digits

Thanks that is what I was looking for :-)
by chris
Tue Jan 09, 2018 10:06 pm
Forum: Shell
Topic: SOLVED : Bash remove trailing digits
Replies: 2
Views: 17979

Re: Bash remove trailing digits

You can use

Code: Select all

VARIABLE="test 556";

VARIABLE=${VARIABLE//[0-9]/};
But this will remove all digits not only at the end.

Better is to use sed

Code: Select all

VARIABLE=`echo $VARIABLE | sed -e 's/[0-9]*$//g'`;
by chris
Fri Dec 22, 2017 8:24 pm
Forum: Servers
Topic: Error while writing to "/var/log/procmail.log"
Replies: 0
Views: 45049

Error while writing to "/var/log/procmail.log"

Hello,

I have a error message in my logs :

Code: Select all

procmail: Error while writing to "/var/log/proclog.log"
Put the user postfix owns the file and has writing permissions.
I don't understand.
by chris
Wed Dec 06, 2017 10:10 pm
Forum: Servers
Topic: bind forward one hostname to another host
Replies: 1
Views: 24069

Re: bind forward one hostname to another host

Almost correct,
You need to add CNAME

Code: Select all

foo.example.com.    IN   A           192.168.1.1
bar.example.com.    IN   CNAME   foo.example.com.
by chris
Sun Nov 19, 2017 8:07 pm
Forum: HTML
Topic: html CSS style second line spacing
Replies: 1
Views: 19270

Re: html CSS style second line spacing

Found a solution.

Code: Select all

li {
    list-style-type: disc;
    list-style-position: inside;
    text-indent: -4em;
    padding-left: 5em;
}
by chris
Sun Nov 19, 2017 8:03 pm
Forum: HTML
Topic: html CSS style second line spacing
Replies: 1
Views: 19270

html CSS style second line spacing

Hi, I would like that a second line (and following lines) has an indent. So that the first line is more to the left than the other lines. <ul> <li>Text</li> <li>Text</li> <li>Reeeeaaaaaaal loooooooooooooooooooooong tttteeeeexxxxtt and it has a second line.</li> </ul>
by chris
Thu Sep 28, 2017 6:40 pm
Forum: SQL
Topic: Limit digits after decimal points in SQL
Replies: 1
Views: 17154

Re: Limit digits after decimal points in SQL

I know 2 ways:
With round

Code: Select all

SELECT ROUND( AVG(number) , 2 ) FROM table;
Or with DECIMAL:

Code: Select all

SELECT ( AVG(number) AS DECIMAL(16, 2) )FROM table;
Both should work