|
-
Pattern match problem
Date: 09/16/07
(MySQL Communtiy) Keywords: mysql, sql
Hello. I am trying to learn how to solve a complicated (well, for me, I guess :)) ) problem in MySQL. But to do this I first try to figure out, how to solve a simpler problem. May somebody help me? I'll try to formulate it below Let's say I have a table with student_name, quiz_date and grade (Pass/Fail). (Each student can have more than 1 quiz, not necessary the same number of quizes). I need to create a list of students, whose grades match the following pattern Pass/Fail/Pass in the adjacent(!) dates. There are 2 main problems for me: 1) How to compare dates. 2) What is the right way to match patterns for a single student.
I would appreciate somebody giving me the decent way to solve this problem. Thank you a lot.
Source: http://community.livejournal.com/mysql/119367.html
-
Open tables question
Date: 09/24/07
(MySQL Communtiy) Keywords: mysql, sql
Following with my previous post (thanks to everyone who answered!) I've been looking around and I've seen there are a lot of unused open tables. mysql_stat says 244 open tables while SHOW OPEN TABLES lists 66. This seems a lot of tables. There is a way to close all these tables? Could it be part of the reason the max_user_connections is reached so quickly?
Also, my host says they updated my connections from 100 to 200. Is that much?
Many thanks in advance!
Source: http://community.livejournal.com/mysql/119588.html
-
Segfaultalicious
Date: 09/28/07
(PHP Community) Keywords: php, mysql, xml, sql, apache
I am just putting the finishing touches on a year long project that included in its design the use of an Op-Cache of some sort. After spending the last week and a half slamming a dev. server with siege for testing I noticed that occasionally the apache2 would seg. fault. We're using the LTS version of Ubuntu 6.04 with a stripped down environment dedicated and slaved to Apache w/memcache. From what I've researched and tested, this is actually a pretty well known issue with APC and also xcache. I've already written a simple daemon to watch the primary error log and if it spots a segfault fault error report to restart Apache, but this feels like using a band aid on a compound fracture.... Anyone have any other suggestions?
PHP compiled with just the bare minimums plus memcache, mysqli & mysql, JSON, and the XML library.
Source: http://community.livejournal.com/php/588121.html
-
Zoho adds database to office suite
Date: 10/03/07
(Data Management) Keywords: mysql, database, sql, postgresql
Zoho is filling out it on demand suite with a database and reporting application. Zoho DB can convert spreadsheets into databases and supports pivot tables. It also supports SQL queries (Oracle, SQL Server, DB2, Sybase, MySQL, PostgreSQL, Informix and ANSI SQL dialects). ZohoDB has a rich...
Source: http://blogs.zdnet.com/BTL/?p=6494
-
Importing a text file into MySQL
Date: 10/07/07
(Web Development) Keywords: mysql, database, sql
How can I insert this text file into a a MySQL database?
http://www.census.gov/tiger/tms/gazetteer/zips.txt
"17","60661","IL","CHICAGO",87.642969,41.881351,2031,0.000178
"17","60666","IL","AMF OHARE",87.906803,41.9821,262,0.000023
"17","60901","IL","KANKAKEE",87.869607,41.116582,35952,0.003145
"17","60910","IL","AROMA PARK",87.771887,41.094653,3151,0.000276
"17","60911","IL","ASHKUM",87.941148,40.884431,1484,0.00013
"17","60912","IL","BEAVERVILLE",87.621715,40.967164,672,0.000059
"17","60913","IL","BONFIELD",88.061854,41.15731,1189,0.000104
"17","60914","IL","BOURBONNAIS",87.879023,41.166119,18311,0.001602
"17","60915","IL","BRADLEY",87.860115,41.145376,10071,0.000881
Source: http://community.livejournal.com/webdev/439132.html
-
image galleries
Date: 10/16/07
(PHP Community) Keywords: mysql, database, sql, web
hi all!
I'm in need of an image gallery script, and was wondering if anyone had any suggestions? I've been browsing around and testing a few and can't quite find one that matches what i need.
i need to be able to upload the photos via the website, for thumbnails to be created and then clicking on the thumbnail takes you to the full size image.
However, all the scripts i've found, when making the thumbnails, make them square, where as i'd prefer it to be more dynamic. So say each thumbnail had a height of 90px, and the width was determined from the full size image, rather than being fixed to 90px aswell. That way when displayed on the page, tall images don't look squashed.
Any scripts out there like that? I don't mind if it is linked to a mysql database or not, tho most don't seem to be.
Ideally it would be seperated into admin area and display area, so that i can customize the look of the displayed photo pages.
Source: http://community.livejournal.com/php/591172.html
-
How To Recover Openfire admin Password
Date: 10/22/07
(Java Web) Keywords: mysql, database, sql, java
Openfire is a cross-platform java based free Instant Messaging server which implements the XAMPP (Jabber) protocol with extensions. It is very well suited as corporate instant messaging solution. Here is how you can recover the admin password, in case you forget it.
How to recover Openfire admin password
1. Login to MySQL and use openfire database. I [...]
Source: http://blog.taragana.com/index.php/archive/how-to-recover-openfire-admin-password/
-
похапе
Date: 10/23/07
(Code WTF) Keywords: php, mysql, sql
Прелюдия: есть товарищ, который имеет программистское образование, умеет C++, любит порассуждать о том, что php не язык, mysql не субд и т.д. И ему дана простая задача: есть переменная, которая может содержать значения от 1 до 10 - рейтинг определенного объекта. Есть картинки с названиями 1.gif, 2.gif, 3.gif и т.д. Как это сделал бы я? (в конечном итоге и сделал): А как поступит хардкорный сишник, для которого php - говноязык?
switch ($rres['karma']) {
case '':?>
break;
case '1':?>
break;
case '2':?>
break;
case '3':?>
break;
case '4':?>
break;
case '5':?>
break;
case '6':?>
break;
case '7':?>
break;
case '8':?>
break;
case '9':?>
break;
case '10':?>
break;
}
сохранено форматирование оригинала.
Source: http://community.livejournal.com/code_wtf/108965.html
-
PHP/MySQL : Unknown column 'column_name' in 'field list'
Date: 11/05/07
(PHP Community) Keywords: php, mysql, sql, google
I've already scoured google in relation to this issue and so far have found many solutions, none of which seems to work.
PHP 4 MySQL 4.1.20
The script I'm working on at the moment returns a MySQL error : Unknown column 'column_name' in 'field list' Where column_name can be any valid column for the table. I've changed the order and the query insert style several times, restarted the MySQL server, and various other rain dances, all with the same results.
Here's a brief overview of the query that the script generates, it works fine when run directly in MySQL so I'm guessing there's something funny going on with the PHP/MySQL interface.
INSERT INTO table (area, type, city, state, cost, status, capacity, allowed, description, link, startdate, regclose, enddate, over18, gender, level1, level2, level3) VALUES ('East', 'eryery', 'sdfaf', 'CA', '1', 'C', '1', 'N', 'ewt', 'yerr', '2007-05-04 01:00:00', '2010-01-01 01:00:00', '2011-01-01 01:00:00', '1', 'M', '1', '1', '1')Error in query: INSERT INTO table (area, type, city, state, cost, status, capacity, allowed, description, link, startdate, regclose, enddate, over18, gender, level1, level2, level3) VALUES ('East', 'eryery', 'sdfaf', 'CO', '1', 'C', '1', 'N', 'ewt', 'yerr', '2007-05-04 01:00:00', '2010-01-01 01:00:00', '2011-01-01 01:00:00', '1', 'M', '1', '1', '1'). Unknown column 'area' in 'field list'
Any ideas anyone? I generally try and hammer these things out on my own but this one's just too busy givnig me a migraine after working on it for so long. Still with no idea how to start on it.
Source: http://community.livejournal.com/php/594338.html
-
Unknown column __ in 'field set' part 2
Date: 11/05/07
(PHP Community) Keywords: php, mysql, sql
ok, still banging my head against this one. Here's some more information.
Output from PHP/MySQL on attempted insert: Error in query: INSERT INTO regTable (area) VALUES ('West_Coast'). Unknown column 'area' in 'field list'
However, when I run that query on its own in the CLI or phpMyAdmin it works fine. It can be any valid column in that table and it still creates the same error.
Here's the PHP/MySQL code, maybe the issue is with how I'm using the $_REQUEST array or concatenating the string for the query. In addition and just to eliminate possibilities I tried copying the output query from the script and putting it in as a static query in the same script and it works fine that way as well.
Still at a loss.
$query = "INSERT INTO regTable (area) VALUES ('".$_REQUEST['area']."')"; // $query = "INSERT INTO regTable (area) VALUES ('West_Coast')"; $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error());
Source: http://community.livejournal.com/php/594655.html
-
DBA (db4) as cache before MySQL
Date: 11/08/07
(PHP Community) Keywords: mysql, sql
I’m thinking about that:
What about using DBA (db4) before connecting to MySQL for speed-up and reduction server loading.
I want to store document last-modified time and select it by URI-key. Then compare it with request header “If-Modified-Since” and if visitor have actual cache — send status code 304 (Not Modified) and don’t connect to MySQL.
I just interesting, what about DBA perfomance in compare with MySQL? Will it have a matter?
Source: http://community.livejournal.com/php/595432.html
-
How To Address Translator Pro Warnings
Date: 11/12/07
(Java Web) Keywords: php, mysql, sql
We are having 2-3 reports of users seeing warnings (not error) using Translator Pro with the latest version of WordPress while posting a comment or publishing a post:
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2) in …/wp-content/plugins/translator/translator.php(15) : eval()’d code on line 1080
Warning: mysql_real_escape_string() [function.mysql-real-escape-string]: A link to the server [...]
Source: http://blog.taragana.com/index.php/archive/how-to-address-translator-pro-warnings/
-
Solution: MySQL Master-Master Replication Fails With ERROR 1200 (HY000) on Master
Date: 11/16/07
(Java Web) Keywords: mysql, sql
When you try MySQL master-master replication with two (or more) servers you may often find that in the process of configuring the original master to also act as a slave server (start slave), it fails with the following error:
mysql> start slave;
ERROR 1200 (HY000): The server is not configured as slave; fix in config file or [...]
Source: http://blog.taragana.com/index.php/archive/solution-mysql-master-master-replication-fails-with-error-1200-hy000-on-master/
-
Open Source PHP4 Search Engines?
Date: 11/16/07
(PHP Community) Keywords: php, mysql, html, sql, web
Hello Friends
I want to add a search functionality to a project I am working on. I'd like the search function to index text held in several MySQL tables and then generate a list of keywords to be stored in another table. I do not want a web crawler or an indexing function that indexes files on the filesystem.
The search function will then access this table of keywords in order to find matching documents, and hopefully return them in order of relevance.
I know of this project: http://www.phpguru.org/static/PorterStemmer.html However, it is PHP5 only. The PHP4 project it borrows from, http://www.chuggnutt.com/stemmer.php may or may not work, but it seems to perhaps be buggy.
Anyone have any recommendations for such a project?
Thanks!
Source: http://community.livejournal.com/php/596534.html
-
6 MySQL Database Replication Tips
Date: 11/18/07
(Java Web) Keywords: mysql, database, sql
Replicating on two or more MySQL master database servers
1. MySQL Master-Master Replication Fails With ERROR 1200 (HY000) on Master
2. Password problem are solved by carefully checking your grant statements
3. When you have more than two master servers, you must use log-slave-updates option to ensure that changes are propagated in a chain. Beware of infinite looping [...]
Source: http://blog.taragana.com/index.php/archive/6-mysql-database-replication-tips/
-
Monitoring MySQL Queries Using Bash Script
Date: 11/18/07
(Java Web) Keywords: mysql, sql
Monitoring MySQL queries is a favorite pastime of MySQL administrators especially for performance reasons. Here is a simple bash script to monitor long running MySQL queries in realtime using the ubiquitous ’show processlist’:
#!/bin/bash
while [ 1 ]
do
mysql -N -u root -ppassword -e 'show processlist' |grep -v 'show processlist'
[...]
Source: http://blog.taragana.com/index.php/archive/monitoring-mysql-queries-using-bash-script/
-
CMF for web2.0 projects
Date: 11/20/07
(PHP Community) Keywords: php, mysql, database, sql, web
Regards,
This is situation, i have a task on my work to update group of ours sites with using of web2.0 technologies
Engine writed on php5.2 & mysql5
It's simple MVC engine, that i have used over a one year in my projects. So, now i need to rewrite it and i must do it in any cases.
I thin, somebody may interesting on it to have community project?
I need some help with ajax and sql databases designing. U can help me with translation if u want - u see - my english is wery bad ;) (i'm from russia)
with any questions please contacts me with my icq 480.814.094 thanks
Source: http://community.livejournal.com/php/597187.html
-
Can't get PHP5 to read mySQL
Date: 11/21/07
(PHP Community) Keywords: php, mysql, sql, apache
I have PHP5.2 running under Apache 2.2 on Windows XP, and followed all directions to enable the mySQL library for PHP, but it's not working. Here's what I did:
Uncommented the extension lines for php_mysql.dll in c:php\php.ini Enabled c:\php into the Windows PATH variable Copied the mysql library DLL to windows/system32
Here is my phpMyAdmin config against this (Apache's port is 8080, also):
$cfg['Servers'][$i]['host'] = '127.0.0.1:8080'; $cfg['Servers'][$i]['extension'] = 'mysql'; $cfg['Servers'][$i]['port'] = '3306'; $cfg['Servers'][$i]['connect_type'] = 'tcp'; $cfg['Servers'][$i]['compress'] = false; $cfg['Servers'][$i]['auth_type'] = 'config'; $cfg['Servers'][$i]['user'] = 'root'; $cfg['Servers'][$i]['password'] = 'xxxxxx';
Any other pointers would be greatly appreciated.
Source: http://community.livejournal.com/php/597696.html
-
MySQL: Creating Users & Granting Access Simplified
Date: 11/23/07
(Java Web) Keywords: mysql, sql
In MySQL you can use the GRANT statement to create users and assign privileges to them at the same time. It is extremely convenient and beats create user or directly hacking the mysql.user table. I learned few things about GRANT the hard way.
MySQL allows you to create users associated with a particular host name [...]
Source: http://blog.taragana.com/index.php/archive/mysql-creating-users-granting-access-simplified/
-
MySQL SQL Delete Notes
Date: 11/27/07
(Java Web) Keywords: mysql, database, sql
To delete duplicates from a MySQL database table I normally copy the duplicate data first to a temporary table and then use the copied id’s to delete from the original table.
Delete using the temporary can take two forms. First is the slow way:
delete from target where id in (select id from temp);
This can be [...]
Source: http://blog.taragana.com/index.php/archive/mysql-sql-delete-notes/
|