Hi all, im tearing my hair out over this one. A query is throwing an error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'FROM, SUBJECT, DATE, READ, MAIL ) VALUES ( 'EJackson', 'dfdf', '1270974101', 'fa' at line 1
I printed out the query to see...
Hello guys!
I have interview for an internship with company that wants to implement document management system and they are considering on the first place open source solutions, their top choice being Alfresco, but decision is still not final, part of my work there would be to investigate is Alfresco the best solution.
What I have seen...
I have a system where registered users can vote up/vote down comments for a picture. It's very similar to Stack Overflow's voting system.
I store the votes in a table with values as such:
vote_id | vote_comment_id | vote_user_id | vote_date | vote_type
Now I have a few questions concerning the speed and efficiency for the following:...
I'm using glassfish(v2.11) as my application server and I have another machine for mysql database server. Currently I want to separate the app server and db server, so I create a jdbc datasource to point to mysql server, but it doesn't works as expect, by the way, when I create datasource to point to local machine (glassfish app server ...
Hi. I have a MySQL query
SELECT * FROM 'redirect'
WHERE 'user_id'= \''.$_SESSION['user_id'].' \'
ORDER BY 'timestamp'`
I want to paginate 10 results per page. How Can I do it?
...
i have user list , and i have select box to filter userlist one of the select box options is show by most viewed so i have also need user information too .
i want to sort my users based on most viewed profile in my user list .
i have these two tables but i don't know how to right correct query to make this happen .
i used grouping like t...
Hi,
I’m going to calculate a ratio between two entities but are having some trouble with the query.
The principal is the same to, say a forum, where you say:
A user gets points for every new thread. Then, calculate the ratio of points for the number of threads.
Example:
User A has 300 points. User A has started 6 thread. The point rat...
Hello. I'm looking into a possible feature for my little to-do application... I like the idea that I can send an email to a particular email address, containing a to-do task I need to complete, and this will be read by my web application and be put in the database... So, when I come to log into my application, the to-do task I emailed wi...
I am getting this error,
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' address='xxxxx', city='sssssssss', pincode='333333333', state='Assam', count' at line 1
Thanks in advance.
http://dpaste.com/hold/181959/
...
I want to add STI to an existing table using a custom type column. Let's call this taste_type whose corresponding model is Fruit.
In the Fruit model I have:
set_inheritance_column :taste_type
In my migration to add STI I have:
class AddSTI < ActiveRecord::Migration
def self.up
add_column :fruits, :taste_type, :string, :limit ...
The mysqltuner.pl script gives me the following recommendation:
query_cache_limit (> 1M, or use smaller result sets)
And MySQL status output shows:
mysql> SHOW STATUS LIKE 'Qcache%';
+-------------------------+------------+
| Variable_name | Value |
+-------------------------+------------+
| Qcache_free_blocks | 1...
I've got 3 tables that are something like this (simplified here ofc):
users
user_id
user_name
info
info_id
user_id
rate
contacts
contact_id
user_id
contact_data
users has a one-to-one relationship with info, although info doesn't always have a related entry.
users has a one-to-many relationship with contacts, although cont...
Is it possible to use mysql to search for the word "arsech" and find the word "Search" (if it is in the database)?
...
I have a user system set up in a 'users' table, and I have groups set up in a 'groups' table. Essentially, I want users to be able to join any and all the groups that they want, in the same was as one would on facebook.
How would one go about structuring this in a mysql/php database system? Just a quick summary would be helpful!
I've l...
i have a menu, it contains multiple items, each menu item will retrieve data from the database.
i want to do it without the page refresh, i want like an area that will change when the user clicks on the menu link.
How should i send data to the php script and how should i get it from there and preview it on the page.
if you can send me an...
I use this bit of code to feed some data i have parsed from a web page to a mysql database
c=db.cursor()
c.executemany(
"""INSERT INTO data (SID, Time, Value1, Level1, Value2, Level2, Value3, Level3, Value4, Level4, Value5, Level5, ObsDate)
VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)""",
clean_data
)
The parsed data lo...
I'm building Ruby on Rails 2.3.5 app. By default, Ruby on Rails doesn't provide foreign key contraints so I have to do it manually. I was wondering if introducing foreign keys reduces query performance on the database side enough to make it not worth doing. Performance in this case is my first priority as I can check for data consistency...
I have three tables
listings: id, pid, beds, baths, etc, etc, etc, db
locations: id, pid, zip, lat, lon, etc, etc, etc, db
images id, pid, height, width, raw, etc, etc, db
id, pid & db are indexed. db just references the mls provider a particular item came from. in images the raw column holds raw image data
there are about 15k rows i...
Hey All,
Sort of a methods/best practices question here that I am sure has been addressed, yet I can't find a solution based on the vague search terms I enter.
I know starting off the question with "Fast and easy" will probably draw out a few sighs, so my apologies.
Here is the deal.
I have a logged in area where an ADMIN can do a wh...
Hi,
how do i get the storage engine used by a specific database in MySql?
Thanks
...