yep, your're right
thanks for clearing that up :)
How do most mysql folks sync live and development databases ?
As an alternative, I could use a PHP script on a late-night crontab.
g
On Sep 13, 2006, at 1:11 AM, Chris wrote:
Graham Anderson wrote:
Is anyone using subversion to
Is anyone using subversion to sync live and development databases?
If so, how?
Is this desired or a best practice?
Everything except my databases are under version control.
In theory, I would like my databases to sync with the same subversion
'svn update' command.
That way, all web content up
Solved it with Union :)
SELECT images.id,images.name, playlist.title FROM images,playlist
WHERE playlist.image_id = images.id
UNION
SELECT images.id,images.name, media.title FROM images,media WHERE
media.image_id = images.id
ORDER BY id ASC
On Jun 23, 2006, at 6:44 PM, Graham Anderson
I am trying to build a query to
1) Get all the results from one table, 'images'
2) For each entry in the 'images' table, find the correct title from
the 'playlist' OR 'media' table where images.id = which_table.images_id
images table
id, filename
playlist table
title images_id
media table
t
many thanks Chris :)
g
On May 24, 2006, at 1:19 AM, Chris Sansom wrote:
At 23:17 -0700 23/5/06, Graham Anderson wrote:
Are there any advantages to converting this 'working' query below
to use INNER JOIN ?
If so, what would the correct syntax be ?
Many thanks
SELECT cat
Are there any advantages to converting this 'working' query below to
use INNER JOIN ?
If so, what would the correct syntax be ?
Many thanks
SELECT category.name, page.name, content.title, content.body
FROM category, page, content
WHERE content.page_id = page.id
AND page.category_id = category
In the below query, the results first row is usually the same 3-4
tracks out of 30.
so should I use PHP to generate a random seed, $r, and pass that to the
query ?
ORDER BY RAND($r)
or, can it be done just with mysql
many thanks
g
On Oct 3, 2005, at 10:15 AM, Michael Stassen wrote:
Graham
is there a way to make ORDER BY RAND() at bit more spontaneous ?
I am using it in a php statement:
$sql = "SELECT media.id,
artist.name as artist,
artist.spanish as bio,
artist.purchaseLink,
artist.picture,
media.sp
is there a way to make ORDER BY RAND() at bit more spontaneous ?
I am using it in a php statement:
$sql = "SELECT media.id,
artist.name as artist,
artist.spanish as bio,
artist.purchaseLink,
artist.picture,
media.spa
got it to work
thanks
On May 10, 2005, at 7:22 PM, Graham Anderson wrote:
I have an ORDER statement like:
ORDER BY playlist.order_id ASC,RAND(playlistItems.playlist_order)
I am trying to get a random result very time the query is run ...
Unfortunately, this statement gives the SAME random
I have an ORDER statement like:
ORDER BY playlist.order_id ASC,RAND(playlistItems.playlist_order)
I am trying to get a random result very time the query is run ...
Unfortunately, this statement gives the SAME random result each time
how can I get mysql to randomly jumble the playlist items for a
r
how do I get the average number of hits per day
I have a table like:
DateTimeid ip
20050506190723 1 121.198.262
what I have so far
SELECT DateTime , count( * )
FROM userLog
GROUP BY DateTime
LIMIT 0 , 30
I assume that DateTime would have to be converted to a specific da
I have a query:
I am trying to get a percentage of the total for each city
SELECT userLog.city,userLog.region,
COUNT(*),
/*
Count(userLog.id) is always 1
was hoping to get the total row returned
*/
COUNT(*)/COUNT(userLog.id),
media.name,artist.name
FROM userLog,media,artist
WHERE userLog.medi
Shawn :)
g
On Apr 13, 2005, at 11:00 AM, [EMAIL PROTECTED] wrote:
Graham Anderson <[EMAIL PROTECTED]> wrote on 04/13/2005 01:46:35 PM:
Hi
I am trying to set up my Match statements to filter the result of the
main query [which works]
If 'chris' does not exist in the first MATCH sta
Hi
I am trying to set up my Match statements to filter the result of the
main query [which works]
If 'chris' does not exist in the first MATCH statement [AND MATCH
(media.name, media.product)], then the results get a bit screwed up :(
If the first match statement finds something, then the quer
how keys from
tbl_properties.php: Missing parameter: table
huh ?
On Apr 1, 2005, at 2:21 PM, Graham Anderson wrote:
In the simple query...
the city field showed the result 'Los Angeles' in every row
the distance field showed incorrect results to :(
City|
PM, Peter Brawley wrote:
What was wrong with Graham's simpler query?
PB
-
Graham Anderson wrote:
I upgraded my local mysql version to 4.1.10a and the below query
finally works :)
How can I now amend the query so it works on my remote server running
mysql 3.23.58 ? From one headache to ano
N ON C.CityID = N.PrimaryCityID
WHERE C.City = 'Los Angeles'
AND N.Distance <20
many many thanks to all those that replied :)
g
On Mar 31, 2005, at 11:49 PM, Philip M. Gollucci wrote:
Graham Anderson wrote:
What is the proper way to say this ?
SELECT C.City, N.Distance
FROM
What is the proper way to say this ?
SELECT C.City, N.Distance
FROM Cities C
JOIN Nearbycities N ON C.CityId = N.PrimaryCityId
WHERE N.CityId =
(SELECT Cities.CityId FROM Cities WHERE Cities.city = 'Los Angeles')
AND N.distance < 20
I am trying to enter in a city and get all the nearby cites with
this sql works on mysql version 3.23.58...my remote server
SELECT c.City, r.Region, co.Country
FROM subnets s, cities c, regions r, countries co
WHERE c.CityId = s.CityId
AND c.RegionID = r.RegionID
AND c.CountryID = co.CountryId
AND s.SubNetAddress = '24.24.172'
LIMIT 0 , 30
but the same syntax fa
I am trying to determine the average time that a Distinct IP address is
using the server
If I have 15 thousand records of ip addresses and access times like:
IP Now() media.id
--
10.1.7.205 20
I have 3 different tables I need data from
And, the tables have the potential to get fairly large
I am using mysql 4.1.3
This working query below pulls up all media requests for 'Yolanda
Perez' in Los Angeles
Is there a appreciably speedier way to say the below ?
I have begun dipping my toe
stupidly
My DateTime field is in this format:
March 23, 2005, 3:49 pm
If I want to run this sql
SELECT TO_DAYS(MAX(DateTime)) - TO_DAYS(MIN(DateTime)) AS record
FROM userLog
I gather I need some extra function like..
SELECT TO_DAYS(MAX(Convert _Function(DateTime))) -
TO_DAYS(MIN(Conv
how do you search for an empty field ?
I want to filter out records where the ipAddress field is empty
SELECT * FROM 'userLog' WHERE 'ipAddress' IS [empty] ?
many thanks
g
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAI
My server has mysql: version 3.23.58
// Performing SQL query
SELECT cities.city, regions.region, countries.country
FROM cities
JOIN subnets on subnets.cityid=subnets.cityid
JOIN regions on subnets.regionid=regions.regionid
JOIN countries on subnets.countryid=countries.countryid
where subnets.
I am trying to make a proper subqueryjust not sure bout the syntax
I use this this basic query to connect all of my tables:
# here is the basic query that connects all the tables..this works :)
$sql = 'SELECT playlist.name as playlist_name, artist.name as artist,'
. ' artist.'.$language.' as
36 AM
Subject: Re: Newbie: How to deal with multiple languages
Hello.
You can find an answer here:
http://dev.mysql.com/doc/mysql/en/Charset.html
MySQL supports column character sets on columns of some types
(char,varchar,text). Probably if I were you I would use Unicode
in my application.
Graham A
I am copy/pasting text from a microsoft word doc into phpmyadmin
are there any special tricks to avoid strange characters...most of my
text is in Spanish
The only thing that seems to work is converting the text to ASCII which
ditches all the Spanish formatting :(
is there some process to make t
many thanks :)
that was exactly what I needed
g
On Nov 26, 2004, at 4:27 PM, Rhino wrote:
- Original Message -
From: "Graham Anderson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 26, 2004 6:28 PM
Subject: change field names in a query
what is t
what is the proper mysql syntax to change field names after the query
is done
if I have a table with:
id
englishText
spanishText
picture
And I query the table with:
select id, spanishText
from myTable
limit 30
how do I change the 'spanishText' field name to say 'language' ?
many thanks
g
--
MyS
I have a mysql db that contains tables with multiple language fields
for example...
Artist_id 'PK'
Artist_name
Artist_pictLink
Artist_purchaseLink
Artist_bio_Spanish
Artist_bio_English
Artist_bio_German
I have other tables with a similar layout...Is this needlessly
complicated ?
track_id 'PK'
31 matches
Mail list logo