home
to by aitzol
create database database_name;
grant all on database_name.* to 'user_name'@'host_name' [identified by 'user_password']
to by nando.quintana
if distinct_ids != []:
ids = "("+", ".join(distinct_ids)+")"
commented_photos = Photo.objects.extra(where=['id IN '+ids])
to by nando.quintana
SELECT *
FROM erosketak_erosgaia e, erosketak_produktua p
WHERE e.erosgai_mota_id_id = p.mota_id
AND e.id NOT
IN (to by nando.quintana
UPDATE `pasarteas` SET `zintaren_kodea` = 'ELG-022' WHERE `zintaren_kodea` = 'BER-123'
to by nando.quintana
# su - mysql
# mysql
CREATE DATABASE databasename;
GRANT ALL PRIVILEGES ON databasename.* TO "user"@"hostname" IDENTIFIED BY "password";
FLUSH PRIVILEGES;to by nando.quintana
# su - postgres
# psql
CREATE USER username WITH PASSWORD 'password' CREATEDB CREATEUSER;
to by nando.quintana
select tag, subfieldcode, subfieldvalue, tagorder, subfieldorder
from marc_subfield_table where bibid = '565'
order by tag, tagorder, subfieldcode, subfieldorder;
to by txus
#Open the file
f = open('26.log','r')
#some variables
ITEMS = total_log_lines = TAGS = BOOL = SELECT = POWCounter = 0
for s in f:to by nando.quintana
-- http://poeticcode.wordpress.com/2007/01/27/tag-cloud-algorithmlogicformula/
select entity,metric from fact order by metric desc;
select entity,metric from fact ordre by metric desc limit 0,<n>;
select * from (select entity,metric from fact order by metric desc limit 0,<n>) order by entity;