im going to use ajax/comet to create a chat. and i want to store the chat conversation.
every keypress will trigger an event that sends to backend.php that will store the letter. i wonder if i should store it directly in the database or in the textfile.
you dont have to consider the details for exactly how this chat's architecture will...
Hello,
This is a follow up from my last question: http://stackoverflow.com/questions/2046610/mysql-best-method-to-saving-and-loading-items
Anyways, I've looked at some other examples and sources, and most of them have the same method of saving items. Firstly, they delete all the rows that's already inserted into the database containing...
Running this procedure causes MySQL (or phpMyAdmin) to freeze. I have to stop MySQL with from XAMPP command, which freezes and "is not responding" about 20 seconds before stopping. I believe this is caused by the delimiter command, which on it's own begins the problems. I have tried using a different delimiter ("//") to no effect.
Any h...
I would like to speed up my MySQL on my MacBook. It's much slower than MySQL running on our servers or on virtual machines on other laptops.
All the tables I deal with are InnoDB. I run a lot of django unit tests so there are a lot of create table commands that get run.
Update:
I should note that I'm really comparing this to another l...
I have two mysql tables - a sales table:
+----------------+------------------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------------+------------------------------+------+-----+---------+-------+
| StoreId | bigint(20) unsigned | NO ...
I have a table called "teams" with column "inactive" and another table "events" with column "time". How can I have the "inactive" column updated (to true), if the latest date in "events" for any team occurred X amount of time ago?
I know this can be doe with a php script, but i'm looking for a sql solution
...
What is wrong with this:
SELECT *,
GROUP_CONCAT(DISTINCT w.tag_word ORDER BY w.tag_word ASC SEPARATOR ' ') AS tags,
MATCH (title, description, tags) AGAINST ('london') AS score
FROM article G
JOIN tag_index I ON G.article_id = I.tag_target_id
JOIN tag_word W ON I.tag_word_id = W.tag_word_id
WHERE I.tag_type_id = 1 AN...
The infinity (∞) symbol gets converted to ∞ when it is inserted into my MySQL table by a PHP script, but if I insert it directly from phpMyAdmin, it inserts correctly. The symbol is passed to the PHP script by a GET call with the JavaScript function encodeURIComponent() around the contents. The field in the MySQL database is utf8_swe...
Lets say I do not want to get the VPS or Dedicated Server required to run constant indexing like with Thinking_Sphinx plugin or many of the other full text search plugins for ruby on rails.
I have a bunch of listings in the database with a Name field and category field (among other things).
It it possible search for a name in a certain...
I'm sure this is super easy, but can't seem to figure it out.. I need to select all titles from my database where the title starts with A, or B, or C etc. Here's what I've tried so far:
SELECT * FROM weblinks WHERE catid = 4 AND title LIKE 'A'
but returns nothing.. Could someone help me out with this?
Cheers
...
I have a table with following fields
Service_type and consumer_feedback.for example:
Service_ID consumer_feedback
31 1
32 -1
33 1
31 1
32 1.
I want to find the sum of consumer_feedback for each Service_ID through java code
ResultSet res = st.executeQuery("SELECT SUM(consumer_feedb...
im using comet to push new data to the user.
1: but i wonder how i should check if new data (new messages, new replies etc) is available?
should i in the php in the background use a while loop and sleep it for 1 min so it can check every one min if new data has come in?
or should i have a trigger in the database for this?
what availa...
Hi, i have two columns that store values(numbers), how do i select where my given number is between the values in the two columns?
Example
`id | col1 | col2`
`1 | 20 | 50`
`2 | 200 | 400`
`3 | 500 | 650`
If I have a value of 25, how can i select records where the value of 25 is between them which in this case ...
I have two tables: Coupons and Responses.
The Coupons table includes fields such as:
VendorID [key]
CouponID [key]
CouponDescription
The Responses table includes fields such as:
RespondentID [key]
CouponID [key]
(VendorID not repeated in this table.)
Accepted [true/false]
Rejected [true/false]
Rating [1 to 5]
When someone accept...
im developing a forum and users will be able to upload pictures.
i wonder how i should organize the folders for this?
should they be sorted by threads or users? but how will they then be organized within these folders?
and how could i couple some post's pictures to the database entry? eg, if the post got 5 images uploaded, should i ha...
Hi,
I am using Connector/J 5.1.10 as the JDBC driver for my Database application (which uses MySQL).
I have found that although the default ResultSet returned by a Statement is of type TYPE_FORWARD_ONLY, I am still able to safely call the previous() method on the ResultSet.
I also looked at the source code (com.mysql.jdbc.ResultSetImp...
hi,
I have a products table with the following structure
CREATE TABLE IF NOT EXISTS `products` (
`id` int(50) NOT NULL AUTO_INCREMENT,
`productname` varchar(255) NOT NULL,
`description` text NOT NULL,
`merchanturl` text NOT NULL,
`imageurl` text NOT NULL,
`price` varchar(10) NOT NULL,
`original` varchar(10) NOT NULL,
...
Hi
Is there any way to implement a time based trigger in Mysql 5.1
i.e. it must run at 12H05 every day
Edit
A corn job calling an SQL script is currently been used -
but I am looking for a less complicated solution.
...
I have been tasked with estimating the amount of time it will take to rewrite the data access layer of a .NET application from using SQL Server to use MySQL. It is not up for discussion whether this will happen or not...just how long will it take.
I have estimated all of the work except for translating the stored procedures in SQL Serv...
For my current PHP/MySQL project (over a group of 4 to 5 team members), we are using this setup: each developer codes and test on his localhost running xamp, and upload to a test server via SVN.
One question that I have now is how to synchronize the MySQL database? I may have added a new table to project and the PHP code references to ...