I have a products table and a products_description table. They both have products_id as primary key. However, products_description table has more products_id keys then the products table. How do...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
I was wondering it is possible to retrieve the cardinality from an index through a mysql query in a php script? I am trying to find the number of unique items from tables with 10+ million rows an...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
Hello
Maybe somebody can give me some suggestions, ideeas and help on my problem. I'm not a newbie with SQL but i'm not too great either, i usually don't care about optimization because i don'...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
Not sure where to start on trying to fix this one... Any suggestions?
Error: Unknown column 'i.partid' in 'on clause'
Code:
CREATE TEMPORARY TABLE store_parts_start
(SELECT p.id, 100...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
For a retail site, I would have one table with customers info (name, address, etc.), and then should I (1) create a separate table for each customer to track their orders (items ordered, price, da...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
Hi, I am going through backup and restoring operations and trying to get more familiar with them. In my mysql\data directory I created a couple databases and some tables in each. I only see files ...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
Ok I have a database of all 43,000+ zip codes in the US.
Code:
CREATE TABLE zipcodes (
zip varchar(16) NOT NULL default '0',
city varchar(30) NOT NULL default '',
state varchar(3...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
I have a form that i use to insert values into a table. One of my fields is a float(4,2) field. Does this make this particular field only able to accept 00.00 values? If i try to input 000.00 in m...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
have problems with 2 simple queries and i dont know how to solve them. plz help me.
first one looks like this: 1.What’s the average length of the movies released in 2006? And which movie comes...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
I have in a database which stores insurance quote requests.
I want a query that counts the number of quotes by each referrer, grouping quotes made within a 10 minute period as 1 quote
He...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
I have seen this a couple of times and what throws me for the loop is the column IS in the table.
Unknown column 'cm.state_id' in 'on clause'
Code:
select cm.*, o.userid,c.printable...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
I know table aliases can be used in a select statement so is there a way to use column aliases as below?
SELECT (complex formula) AS result, column1, IF(result>0,'True','False') AS answer F...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
I'm trying to build a webapplication where users can search for a person having a particular preference for color and material. To store this information I use the following structure (a MySQL dum...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
I have found this query which gets rows based on a radius. I need this for zip codes based on lon and lat's.
Code:
$sql2 = "SELECT * FROM table as z WHERE (SQRT( (69.1 * (".$us...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
hi,
i have a query ,
Code:
"select month(str_to_date(fmonth,'%M')) from company where id=2;"
(Query 1)
The fmonth in company has values like 'March,October etc,.....
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
Is it ridiculuous to run 20 DB queries on a page that isnt accessed that often? What is the general rule when it comes to db queries? How many is too many?
...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
I have a table i am dumping false data into. I since deleted this data from the table and when i insert new records the values start at whatever the last record number was from the previous data s...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
I'm trying to limit my results in the following query. When I make this query without the GROUP_CONCAT lines, I get the number of results I specified in LIMIT, when I put those lines back in, I ge...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
Hi,
I have about a couple hundred email addresses in a table... every email address includes @domain.com (the same domain). However, that domain is changing to a new domain... and I need to rep...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
I know that I can use DATE_SUB(NOW(),INTERVAL n DAY) and compare that to a datetime field to get the items from the last n days.
What I would like to do is write a query that selects all the ro...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
I don't get any output with
Code:
$sql = "SELECT tbl1, tbl2.lon, tbl2.lat FROM tbl1, tbl2 WHERE tbl2.zipCode = TRIM(UCASE(tbl1.zipCode)) ORDER BY tbl2.zipCode";
Do I use TRIM(UCA...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
Code:
UPDATE table SET lon = 4.870765 AND lat = 52.366877 WHERE zip = '0000DE'
I am directly accessing phpmyadmin and phpmyadmin doesn't give an error. But when I browse the table the valu...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
hi - daft question alert.
can somebody explain what the m., i., are in the following sql statement?
Code:
$sql = "SELECT m.id, m.name, m.address, m.town, m.url, m.country, m.rank...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
Code:
myTable1
(id) city
(1) Moscow
(2) Lodon
(3) Seoul
(4) Denver
: :
myTable2
(id) city country
(1) Moscow Russia
(2) Lodon England
(3) Seoul ...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine
Trying to compare the first 4 chars with the first 4 chars in a db column
Code:
......
$checkPostal = substr ($postal, 0, 4);
....
....
$sql = "SELECT * FROM table WHERE po...
[Tags: No tags defined yet] - Be the first to Tag this threadAdd TagsCancel
*Note: Tags must be comma (,) seperated. For example: boardtracker, forum search, search engine