mysql

Could not load file or assembly 'MySql.Data, Version=6.2.2.0

I am working on Desktop application with c# and Data base MySQl. When I install its installer on my machine it works fine but when I install it on other machine its give following exception when try to access DB. I am using MySQL.Data.dll to communicate with MYSql. --------------------------- Could not load file or assembly 'MySql.Dat...

proper sql structure

Hi, I have a table results, which has he following columns: ID TestCase Platform 1 P1.1.1 Win1 2 P2 Win1 3 P3 Win3 4 P1.1.1 Win3 I have specific category of Platform's Only 4 Win1,Win2,Win3,Win4 Testcases will repeat for each and every Platform. Now, what I am confused is : I need to List all the distinct TestC...

How to handle large database ?

Hi, I am working in one real-estate website and I have large database around 250 fields in table and 15 lakhs (1.5 million) records in table. I want to give searching functionality in website so, How should I design db such that I can search property fast from these 15 lakhs records. I want to make site like http://www.redfin.com/. is...

DB schema help, linking variations of products

Hay all, I'm making a website where a product can come in a variety of colours and sizes. Each item has a different 'item_code'. How could i link these together? I could have an option, so that when an admin adds a new product, it askes if this product is a variation of another product. If it is then finds ALL the linked products and all...

Some Q regarding SOLR and how it actually works!

I have a classifieds website, and I have currently around 100thousand ads in a mysql table. I am using php to fetch results and to display them on a page. However, I am noticing the searches getting slower and slower. That is why I am planning on installing and using SOLR, as I have heard good things about it. But to my suprise, I have...

MySQL Query - Records between Today and Last 30 Days

Greetings! I want to return all records that were added to the database within the last 30 days. I need to convert the date to mm/dd/yy because of display purposes. create_date between DATE_FORMAT(curdate(),'%m/%d/%Y') AND (DATE_FORMAT(curdate() - interval 30 day,'%m/%d/%Y')) My statement fails to limit the records to the last 30...

DB Connection pool in Servlet or Listener?

Hi, I'm thinking of using DB Connection Pool in J2EE. Database: MySQL Servlets: http://www.webdevelopersjournal.com/columns/connection_pool.html Listeners: http://onjava.com/onjava/2006/04/19/database-connection-pooling-with-tomcat.html now which is a better option & why? Also, any working source code will help me save time. Warm Re...

Opensource CMS that allows defining editable regions

I'm looking for an opensource lightweight CMS for those situations where you would like to be able to set up a web site with some editable content regions, but don’t want to have to install a full-blown CMS or try to hack a blogging system in order to do the job. Something similar to Perch or Cushy CMS, but free and opensource ofcourse. ...

Querying a MySQL database step by step - Best method?

Hi, I am building a web application that uses PHP 5, MySQL 5 and Javascript with jQuery and AJAX. The application is a quite complicated selection process with several pulldown menus that the user can select from in any order. Each select in a pulldown will give some more selection critera, that will limit the choices in the other pull...

How to speed up SELECT .. LIKE queries in MySQL?

I have a MySQL table for which I do very frequent SELECT x, y, z FROM table WHERE x LIKE '%text%' OR y LIKE '%text%' OR z LIKE '%text%' queries. Would any kind of index help speed things up? There are a few million records in the table. If there is anything that would speed up the search, would it seriously impact disk usage by the data...

MYSQL joining multiple queries based on condition

Table x x-id userid startdate enddate Table Y Y-id userid loginid startdate enddate In Table x a user will have only one entry but in Table y the same user can have multiple entry. select * from x-id where enddate BETWEEN DATE( CURDATE( ) ) AND DATE_ADD( CURDATE( ) , INTERVAL 7 DAY ) In this query i need to check with table x enddate...

How to add together the results of several subqueries?

I am running a MySQL query to rank my site's users according to the number of book reviews and recipe reviews they have contributed. After initial issues with a multiple JOIN query, I've switched to a series of subqueries, which is much, much faster. However, although I can extract the numbers of reviews from each member, I can't figure ...

Can a prepared statement in MySQL contain PREPARE and EXECUTE?

I wanted to know if prepared statements can be used in the following way: public static function GetCategoryItems($categoryId,$pageNum, &$rnum_pages) { $sql = 'SELECT DISTINCT COUNT(*) AS items_count FROM item I JOIN sub_category SC ON I.sub_category_id = SC.sub_category_id ...

a nested query question in mysql

Hi, I'm trying to learn nested queries in mysql and I'm stuck while selecting all hotels which are 30 miles away from the city and have rooms that cost 150$ I can chose the rooms which are 30 miles away from the city and costs 150 with this query,but can't reach the hotels. (select id from Rooms where cost = 150 and id in (select...

Does SOLR use up alot of memory on a server?

I have NO EXPERIENCE with SOLR. Does SOLR use more memory than say MySql on a server? I am about to purchase a VPS-package, but they come in different sizes as you can imagine... I contacted the providers today by email, and told them that I was planning on using SOLR which requires java installed. Their response was that it would w...

Is it possible to pass a variable to php without the users 'seeing it' ?

I have a link on a page, and I would like to send a variable to a php file like this: href = "php_file.php?qry=$query" the $query variable contains a query which I would like to make to mysql, inside the php file. My problem is, I don't want the users to 'see' what I am passing along. I would like to use $_POST but from what I know,...

What does the slash mean in an SQL query?

What does the slash character mean in this query? This is being used with a MySql database. SELECT Channel, COUNT(Channel) AS Total, COUNT(Channel) / (SELECT COUNT(*) FROM UserClicks WHERE (Date > '2009-12-1' AND Date < '2010-1-1') AND RoleType='member' ) AS Percent FROM UserClicks WHERE (Date > '2009-12-1' AND Date < '2010-1-1') AND Ro...

Are square brackets valid in an SQL query?

I am looking at a note that someone wrote to me and it looks something like this: SELECT Something FROM Foobar WHERE blah='blah' --- [pulls this too - SELECT Something FROM Foobar WHERE something='elsehappens'] I'm trying to figure out if the --- [ comment - QUERY] is just a comment or if it actually means something I haven't seen be...

adding parameters to LIMIT clause of a SELECT

Hello all! I have the following prepared statement: $sql = "PREPARE stmt_name FROM 'SELECT I.item_id, I.name , I.price, I.discounted_price, I.thumbnail_photo FROM item I JOIN sub_category SC ON I.sub_category_id = SC.sub_category_id JOIN category C ON C.category_id = SC.category_id WHERE C.category_id =...

Looking for case insensitive MySQL collation where "a" != "ä"

Hi all, I'm looking for a MySQL collation for UTF8 which is case insensitive and distinguishes between "a" and "ä" (or more generally, between umlauted / accented characters and their "pure" form). utf8_general_ci does the former, utf8_bin the latter, bot none does both. If there is no such collation, what can I do to get as close as po...