mysql

where to store pictures while paging in php. database or Folder?

Where can i store picture while paging. Whether it should be stored in folder or db. What to store in the db. entire images or only path. if path only how to get the path for a picture in a directory. Please help me Exact Duplicate: User Images: Database or filesystem storage? Exact Duplicate: Storing images in database: Yea or nay? ...

Why Does Adding a Fifth Argument in a MySQL "IN" Clause Dramatically Slow Things Down?

I have three tables named Item, Event, and Seat, constructed like this: Item Id (int) EventId (int) Section (int) Event Id (int) VenueId (int) Configuration (int) Home_team(int) Seat Id (int) VenueId (int) Configuration (int) Section (int) I am using the following query to select all items that are tied to particular home teams: ...

Bundling PHP MySql with Flex to be given to a client

I made an application using Flex,php,mysql. Now to give it to a client, I am bundling this flex application with xampp. There are few problems with this approach : 1. Whenever the flex application runs, an xampp window also opens up. 2. The Apache port number, which I am giving to the client is fixed. Same for mysql port number. What...

ajax library that populates multiple fields

I'm trying to speed up the data entry for my awards database. My "people" table currently has five fields: peopleid first middle last display So an entry might be: peopleid 120 first William middle H. last Macy display William H. Macy Is there an AJAX library that you can suggest that would enable someone entering the data...

Mysql How to check and change the value of MaxNoOfOrderedIndexes variable of NDB Cluster

Hi All, when i am trying to create a table using NDB storage engine i am getting error "Got error 904 'Out of fragment records (increase MaxNoOfOrderedIndexes)' from NDB" how to change the size of this variable..i am not able to find where this variable is stored. thanks in advance. ...

query two tables in one mysql query

im having trouble getting data from two seperate tables so far i have this <? include('config.php'); $xid = $_GET['xid']; $result = mysql_query("SELECT * FROM `config`") or trigger_error(mysql_error()); while($row = mysql_fetch_array($result)){ foreach($row AS $key => $value) { $row[$key] = stripslashes($value); } $result = mysq...

finding the posts related by tags with one specific post in mysql

I have this tables: Posts (post_is, title and text), Tags (tag_id, tag), Post_tag_nn (id, tag_id, post_id). I want for a specific post having for example 4 tags all the posts with those tags, then all the posts with any three of those tags, then all posts with any two of those tags and so on. How can i build a SQL query for this purpose ...

MySQL: Count records from one table and then update another

Got 2 tables / entities, very straightforward scenario. Table poets - Columns: id, poet, nation Table nations - Columns: id, nation, count Basically, nations to poets has a mapping of one to many, naturally. For example, there are 1000 poets from 60 nations. Each poet in poets is assigned to a nation by the nation field which contains...

How can I define a foreign key using netbeans 6.7?

I'm using JPA in netbeans with mysql and I need to define a foreign key. I want to do it graphically because it is very easy to create tables using netbeans 6.7 UI without dealing with SQL commands. Can you tell me how to do it?? ...

How to use ADO.NET DbProviderFactory with MySQL?

How to use ADO.NET DbProviderFactory with MySQL? ...

How to correctly formulate a 3 table mysql query

I need the best way of performing the following task. If possible, take it all the way down to giving me variables for output so i can better see whats going on, a lot of times you guys assume im smarter than i am. Table 1, holds user information, first and last name, email etc. The primary auto_increment key in table 1 is id. Table 2, ...

Trouble deciding on identifying or non-identifying relationship

I've read this question: http://stackoverflow.com/questions/762937/whats-the-difference-between-identifying-and-non-identifying-relationships But I'm still not too sure... What I have is three tables. Users Objects Pictures A user can own many objects and can also post many pictures per individual object. My gut feeling tells me thi...

Select top distinct results ordered by frequency

My table has two columns: id and name. The data looks like this: id | name ---------- 1 Jeff 2 Sam 3 Carl 4 Sam 5 Carl 6 Jeff 7 Dave 8 Jeff What I want to obtain is this: name | frequency ---------------- Jeff 3 Carl 2 Sam 2 Dave 1 Essentially, I need an SQL query that counts the unique ...

Best Way to Port a SQL Server DB Schema to MySQL

What is the best, simplest way to transfer a SQL Server db to MYSQL? ...

unique constraint in mysql

Hi, is a unique constraint an index by default? If not, does a unique constraint has the same performance results as an indexed column when using it in the "select .. where" clause? thanks ...

Error in mySQL query pulling from 3 tables

My query reads as follows: "SELECT config.*, utinfo.* userinfo.* "."FROM config, utinfo, userinfo "."WHERE config.cxid = utinfo.xid"."AND utinfo.uid = userinfo.id" It was working fine before i added the ."AND utinfo.uid = userinfo.id" part at the end. Easier way to do this? Or something im missing? ...

3rd party sql import stops on import of sql file giving error: #1068 - Multiple primary key defined

i have a 3rd party software and i exported the database structure so that i can import it on another computer. i guess a few tables have multiple primary keys but how can i import the tables witout mysql stopping the import because it has detected multi primary keys? this is the error i get: 1068 - Multiple primary key defined i have ...

What is the InnoDB equivalent of MyISAM's key_buffer_size?

When using MyISAM the configuration setting key_buffer_size defines the size of the global buffer where MySQL caches frequently used blocks of index data. What is the corresponding setting for InnoDB? ...

Two-way replication with MySQL to sync instances of a database app between multiple offline clients?

I am tasked with building an application whose database backend needs to be replicated in both directions over an unknown number of clients who are usually offline. Before I explain in detail, my question is whether MySQL replication is feasible for this project or if I should look into other technologies. Here's the general use case: ...

MySQL Join syntax for one to many relationship

I have a situation where I have one table of titles (t1) and another table with multiple links that reference these titles (t2) in a one to many relationship. What I want is the full list of titles returned with a flag that indicates if there is a specific link associated with it. Left Join and Group By: SELECT t1.id , t1.titl...