Check out my Multiply site
I set up a Multiply site with my pictures, videos and blog and I want
to add you as my friend so you can see it. First, you need to join
Multiply! Once you join, you can also create your own site and share
anything you want, with anyone you want.
Here's the link:
ht
* Micah Stevens <[EMAIL PROTECTED]>:
> What kind of speed do you need?
I was aiming at something that would run in 2 hours or so. Currently, it
takes around 3 - 4.
> I had to go to temp tables for a logging application, but not until my
> table got upwards of a million records or so.. For the n
What kind of speed do you need? I had to go to temp tables for a logging
application, but not until my table got upwards of a million records or so..
For the numbers your quoting, it should be pretty quick unless your engine
needs optimization..
On Friday 11 February 2005 11:56 am, Matthew
* Micah Stevens <[EMAIL PROTECTED]>:
> Sounds like a self join should work wonders.
>
> I didn't test this, but the idea should work:
>
>
> select t1.app_id as a1, t2.app_id as a2, t2.word, t2.score
> from tablename as t1
> left join tablename as t2
> on t1.resource_id = t2.resource_id and t1.ap
Sounds like a self join should work wonders.
I didn't test this, but the idea should work:
select t1.app_id as a1, t2.app_id as a2, t2.word, t2.score
from tablename as t1
left join tablename as t2
on t1.resource_id = t2.resource_id and t1.app_id != t2.app_id
group by word
order by word
voila
* Martin Norland <[EMAIL PROTECTED]>:
> Matthew Weier O'Phinney wrote:
> > I have a table which contains the following:
> > id (primary key, auto incrementing)
> > app_id (integer, foreign key)
> > resource_id (integer, foreign key)
> > word
> > score
> >
> > (This is a search
Matthew Weier O'Phinney wrote:
I have a table which contains the following:
id (primary key, auto incrementing)
app_id (integer, foreign key)
resource_id (integer, foreign key)
word
score
(This is a search index.) I want to find all resource_ids from one app_id
that match resour
I have a table which contains the following:
id (primary key, auto incrementing)
app_id (integer, foreign key)
resource_id (integer, foreign key)
word
score
(This is a search index.) I want to find all resource_ids from one app_id
that match resource_ids in another app_id by wo
Zouari Fourat wrote:
am using mysql 3 so i can't do that subquery, how can we do that in mysql 3 ?
and neither can anyone else ;-)... rather a pain, but mysql.com have been
kind enough
to give a detailed explaination on how to rewrite subselect queries as join
queries:
If you put your brain in ge
am using mysql 3 so i can't do that subquery, how can we do that in mysql 3 ?
On Mon, 7 Feb 2005 19:47:08 +, Simon Rees
<[EMAIL PROTECTED]> wrote:
> On Monday 07 February 2005 18:22, Zouari Fourat wrote:
> > Hello
> > I have 2 tables with two columns in each one (cloned tables) like this :
>
On Monday 07 February 2005 18:22, Zouari Fourat wrote:
> Hello
> I have 2 tables with two columns in each one (cloned tables) like this :
>
> ID int(6)
> UserName varchar(25)
>
> and i would like to select usernames from table1 that doesnt appear in
> table2 so i did this :
Depending on which data
:( nothing
On Mon, 7 Feb 2005 14:10:10 -0500, Joseph Crawford <[EMAIL PROTECTED]> wrote:
> try INNER JOIN?
>
>
> On Mon, 7 Feb 2005 19:47:29 +0100, Zouari Fourat <[EMAIL PROTECTED]> wrote:
> > that wont work :(
> > and either when changing RIGHT to LEFT JOIN that wont work
> >
> >
> > On Mon, 7
that wont work :(
and either when changing RIGHT to LEFT JOIN that wont work
On Mon, 7 Feb 2005 13:41:01 -0500, Joseph Crawford <[EMAIL PROTECTED]> wrote:
> try doing this
>
> SELECT a.UserName FROM table1 a RIGHT OUTER JOIN table2 b ON
> (a.UserName != b.username)
>
> On Mon, 7 Feb 2005 19:22:
Hello
I have 2 tables with two columns in each one (cloned tables) like this :
ID int(6)
UserName varchar(25)
and i would like to select usernames from table1 that doesnt appear in table2
so i did this :
SELECT a.UserName FROM table1 a RIGHT OUTER JOIN table2 b ON
(a.UserName = b.username)
and
Hi there everyone,
I'm transferring a client's product from a Visual Basic .NET ACCESS 2000
application to run on a custom install of Apache/MySQL/PHP which I created
(With a custom installer which sets everything up for them).
My question though, is on looking through their ACCESS database
l=php-db
> >
> > but in short, mysql does support this using . db.table.field
> >
> > hth
> > Jeff
> >
> >
> >
> > "Mike Tallroth"
> > <[EMAIL PROTECTED]To:
>
> [EMAIL PRO
lroth"
> <[EMAIL PROTECTED]To:
[EMAIL PROTECTED]
> exus.com>cc:
>Subject: [PHP-DB] JOIN
across db's in MySQL
> 09/18/2003 10:47
>
Subject: [PHP-DB] JOIN across db's in
MySQL
09/18/2003 10:47
In the big scheme of things, I need several functions to be performed by a
web interface / database system. In an attempt to maintain some sense of
order, I'm hoping to divide common data into a seperate MySQL database away
from the function specific data. For example, I need to do project
alloca
I assume something like the following would work, regardless of whether/how
you've called mysql_select_db()
SELECT t1.column FROM database1.table1 t1 JOIN database2.table2 t2 ON t1.id
= t2.id
If you have something working from the MySQL command line, then it's going
to work from mysql_query() with
From: <[EMAIL PROTECTED]>
> to my knowledge this is not possible in MySQL. There are only joins at
the
> table level. I've been curious about this in the past myself, so if i'm
> incorrect, i'm hoping to hear it via this post.
You can stop hoping now. It is indeed possible. :)
mysql> select * f
From: "Moshe Weitzman" <[EMAIL PROTECTED]>
> I have looked all over the web but can't find an example *in php* for
> connecting to a mysql server, selecting database(s), and issueing a query
> which joins across databases. I already know the SQL required to achieve a
> multiple database query. My
[EMAIL PROTECTED]
ourmet.org> cc:
Subject: [PHP-DB] join across
data
I have looked all over the web but can't find an example *in php* for
connecting to a mysql server, selecting database(s), and issueing a query
which joins across databases. I already know the SQL required to achieve a
multiple database query. My question is about how many calls to
mysql_select
Does anyone know how to join cursors after having successfull query ie:
I have multiple queries that get data from different sources and now I need
to join the results, how can I achieve this in PHP (Do I need to write into
a temporary table and then requery? is that the only way? I am using MyS
At 04:09 PM 1/6/03 -0500, Doug Parker wrote:
I have a relational database issue that I'll simplify for the sake of this
post. I have one table, called clients, that has an id and the company
name. For example:
id | company
---
46 Jones Inc.
54 Baker Inc.
etc.
At 16:09 06/01/2003 06/01/2003, Doug Parker wrote:
I have a relational database issue that I'll simplify for the sake of this
post. [...] So it would be like this:
id | company_id | status| company
1 46
I have a relational database issue that I'll simplify for the sake of
this post. I have one table, called clients, that has an id and the
company name. For example:
id
|
company
---
46
Jones Inc.
54
Baker Inc.
etc.
I have another table called projects, that looks
since you didnt list what type DB you are using, i assumed MYSQL. and MYSQL
doesnt have sub SELECTs... :(
http://www.mysql.com/doc/en/UPDATE.html
the syntax lists "...WHERE where_condition..."
Michael Hendsbee wrote:
> UPDATE Emails SET Sent = 'T' WHERE ID = (SELECT Emails.ID FROM Emails
I am writing scripts to load user data into a MySQL database. I have
tables in the DB called People and PeopleEmail. The PeopleEmail table
stores one email address per record with one of the columns
corresponding to the PID of the people table. Is there a way to run a
single query that will insert
me basic info on SELECTs.
http://www.mysql.com/documentation/mysql/bychapter/manual_Reference.html#SELECT
'Luck
-Szii
- Original Message -
From: "admin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 20, 2002 5:48 PM
Subject: [PHP-DB] JOIN statement not pro
Well, the first question is "what's the expected output"?
If you're trying to get, say, title from table1 and rating from table2
and identify the books in table1 by the unique field "id" and in table2
by the field "book_id", then this is what you should have to end up with:
SELECT t1.title, t2
Okay, now this is my first try on fetching data from two tables, and frankly
I'm starting to pull my hair out ;)
All I want is to fetch some data from two seperate tables in my database.
So far I have tried different approches, and below is what I think should
work, but doesn't :(
SELECT * FROM
Okay, now this is my first try on fetching data from two tables, and frankly
I'm starting to pull my hair out ;)
All I want is to fetch some data from two seperate tables in my database.
So far I have tried different approches, and below is what I think should
work, but doesn't :(
SELECT * FROM
Hi,
I've got a problem with database abstraction. There are two tables. One with
articles (id,content,author,time) and one with comments on those articles
(id,article_id,content,author,time). My script looks like this:
function show_news($limit){
/* get db parameters and connect to db */
requir
Microsoft Access: light-duty relational database with a world-class (in my
opinion) GUI interface, but I don't think it's going to help you in this
case.
> > > id in image_data has the same value as id in wt_users
do you mean uid in wt_users? So, $id=session ID? I might set that ahead of
time ju
Ok thanks for that info, but I guess I am ignorant to what MS Access is.
Please enlighten me.
Thanks
Jennifer Downey
"Marius Ursache" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED].;
> the best tool for building "join" queries is MS Access .
>
> make a db same as that you use in m
the best tool for building "join" queries is MS Access .
make a db same as that you use in mysql and build the query with access. then
copy/paste queries from there.
to build queries in access is very simple . drag/drop and other visual ways.
Jennifer Downey a écrit :
> Hi all,
>
> Ok first
Hi all,
Ok first I have figured out my question on storing an image path.
my question now is on joining data from two tables.
wt_users has two fields (cols) called
uid and pid,
uid refers to the user
pid refers to the users pet
image_data has a field called
id which refers to the image path
h help :)
>
> JOIN is an SQL command, so check out the manual of your RDBMS (ie.
> http://www.mysql.com/doc/J/O/JOIN.html for MySQL)
>
> good luck :)
>
> Beau
>
> // -Original Message-
> // From: Jennifer Downey [mailto:[EMAIL PROTECTED]]
> // Sent: Thursday, 2
: Jennifer Downey [mailto:[EMAIL PROTECTED]]
// Sent: Thursday, 21 February 2002 10:47 AM
// To: [EMAIL PROTECTED]
// Subject: [PHP-DB] Join
//
//
// Could someone point me in the right direction for joining
// tables? I have
// searched the php manual for it but only found info on joining arrays.
Could someone point me in the right direction for joining tables? I have
searched the php manual for it but only found info on joining arrays.
If someone could point me to a code snip or a tutorial I would much
appreciate it.
Thanks in advance
Jen Downey
--
PHP Database Mailing List (http:/
orld example may have explained it better.
> All the repeated 'whatever' kind of makes it a bit unexplained.
>
> Martin.
>
> -----Original Message-
> From: Daniel Barton [mailto:[EMAIL PROTECTED]]
> Sent: 28 November 2001 4:14 PM
> To: Martin E. Koss
> Subject: Re: [PHP-DB] J
--
--
Dan Barton
Terrestrial Program Biologist
Asst. Data Manager
Point Reyes Bird Observatory
http://www.prbo.org
[EMAIL PROTECTED]
[EMAIL PROTECTED]
--- Begin Message ---
Try:
select sum(if(whatever=whatever,1,0)) as whatever from wherever where
whatever=whatever;
This is a pretty
of mysql.
Regards,
Andrey Hristov
- Original Message -
From: "Martin E. Koss" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 28, 2001 12:09 PM
Subject: [PHP-DB] JOIN Very SLOW...
> The following does work but it extremely slow.
>
> $phse
t; <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, November 28, 2001 10:09 AM
Subject: [PHP-DB] JOIN Very SLOW...
The following does work but it extremely slow.
$phselect = "select COUNT(*) AS phTotal from properties LEFT JOIN
propertydetails ON properties.PropertyID=prope
The following does work but it extremely slow.
$phselect = "select COUNT(*) AS phTotal from properties LEFT JOIN
propertydetails ON properties.PropertyID=propertydetails.PropertyID where
((propertydetails.Image1Desc='') AND
(properties.PropertyType='$PropertyType'))";
$phresult = mysql_q
I have read the parts of the manual(s) but am just not grasping something...
I have 2 tables, one holds the Property ID etc., and the other holds all the
Property Details. They are connected by a field called 'PropertyID' which is
a unique ID that appears in both records.
I want to count the num
> There isn't the field table_name.ID_city!!!
because you didn't ask for it. You asked for:
table_name.name
table_city.ID
table_city.city
-Original Message-
From: Carlo Loiudice [mailto:[EMAIL PROTECTED]]
Sent: Friday, November 09, 2001 4:02 PM
To: PHP DB
Subject:
select
n.name, c.city, c.ID
from
table_name n, table_city c
where
c.ID = n.ID_city
No sweat.
-Lorenzo
-Original Message-
From: Carlo Loiudice
Sent: Fri 11/9/2001 5:01 PM
To: PHP DB
Cc:
Subject: [PHP-DB] JOIN
Hi,
I'm preforming a join between 2 Mysql tables in this
way:
table_name: ID,name,ID_city
table_city: ID,city
when I query this:
"SELECT table_name.name,table_city.ID,table_city.city
FROM table_name,table_city WHERE
table_name.ID_city=table_city.ID"
The result is a new table with this fields:
r
Hello,
I have been use PHP connect to mssql 6.5 with FreeTDS. I'd like to select
data from 2 table with separate in 2 database name. How could I do this?
here is some example.
DB#1 DB#2
|--> Table#1-in-DB#1 |--
Hi,
I'd like to retrieve data which contain in 2 db. How could I do?
db1->table-in-db1->field-in-table-in-db1
db2->table-in-db2->field-in-table-in-db2
I'd not extract data to new table because I'd like to retrieve data only.
thanks
SF
--
PHP Database Mailing L
Use column-aliasing. To rename a column use the SQL "AS" syntax. Ie.
SELECT first_name AS fname ..
now "fname" is column name in the result set...Do this for each of your
first_name's, obviously using different names and you are set.
/cody caughlan
Norman Tan wrote:
> No actual code, but
No actual code, but hopefully, someone can help me through the theory
here.
I have 2 tables:
members - first_name, last_name
schedule - member1, member2, date
The SQL statement is this:
select s.first_name, t.first_name, f.date from members s, members t,
schedule f where s.first_name=f.member1
PROTECTED]
Asunto: [PHP-DB] Join causing Error?
Can anyone tell me why this:
Line 282mysql_select_db("centraldb",$db);
Line 283$qorder++;
Line 284$result = mysql_query("SELECT q.questid, q.question, q.answer,
q.qorder, q.depart, q.catid,
q.active, q.
Sir, I don't see anything wrong with the syntax in your query. If I
haven't over looked something, and if you haven't misspelled
anything, then you have a data problem. Since your first query
returns a Cartesian product, you should get something if the WHERE
clause returns >= 1 row for each ta
Can anyone tell me why this:
Line 282mysql_select_db("centraldb",$db);
Line 283$qorder++;
Line 284$result = mysql_query("SELECT q.questid, q.question, q.answer, q.qorder,
q.depart, q.catid,
q.active, q.global, q.adate, q.author, q.authoremail, q.askemail,
c.
Hi All,
I have a JOIN statement:
SELECT d.*, b.invoice_id FROM domain_info d LEFT JOIN billing_info b ON
d.domain_id=b.domain_id WHERE billing_cycle = '12' OR billing_cycle = 'Z' OR
billing_cycle = 'C' GROUP BY domain_name
In addition to the fields this statement returns, I would also like
L PROTECTED]]
> Sent: Friday, February 09, 2001 11:17 AM
> To: Gaby
> Cc: PHP-DB
> Subject: Re: [PHP-DB] Join Sentences
>
>
> Hi Gaby,
>
> Your best bet is to probably place the statements you want
> into a function.
> Then, when the function is called if any one sta
:[EMAIL PROTECTED]]
# Enviada em: Friday, February 09, 2001 10:34 AM
# Para: Jorge Santos
# Cc: [EMAIL PROTECTED]
# Assunto: RE: [PHP-DB] Join Sentences
#
#
# No, I know how manage the functions I said for exemple :
#
# If I need insert or delete data in two tables, and one of them returns
Gaby
http://www.atrivia.com
- Original Message -
From: Jorge Santos <[EMAIL PROTECTED]>
To: Gaby <[EMAIL PROTECTED]>
Cc: PHP-DB <[EMAIL PROTECTED]>
Sent: Friday, February 09, 2001 2:17 PM
Subject: Re: [PHP-DB] Join Sentences
> Hi Gaby,
>
> Your best bet is to p
lt;[EMAIL PROTECTED]>
Sent: Friday, February 09, 2001 7:59 AM
Subject: [PHP-DB] Join Sentences
Hi,
( Excuse me for my english )
I wish execute in PHP some consecutives sentences , but if one of them
returns un error, the program must'n execute anyone. I need one set of
sentences that execu
Hi,
( Excuse me for my english )
I wish execute in PHP some consecutives sentences , but if one of them returns un
error, the program must'n execute anyone. I need one set of sentences that executes
the code like one.
I don't know if I explain ... Thanks a lot.
---
Por si acaso alguien me ent
64 matches
Mail list logo