[PHP-DB] Re: is this possible in one query?

2006-01-18 Thread Christoph Kunze

Sjef Janssen schrieb:

Hi there,
I have a table that keeps names for different language codes.
In a short example:
nameId name languageCode
31 House EN
31 Wohnung DE
32 Piece En
32 Stuck De
33 Car EN
33 PKW DE

What I would like is to have a query that returns for example:
nameId = 31
Names = House - Wohnung

Maybe I can even have a result that consists of an array with nameIds and
Names.
Or should I fire a bunch of queries after each other to have this result?

I use mysql and php 4.3.8

Tnxs!!


SELECT nameId, GROUP_CONCAT(name SEPARATOR ' - ') AS names FROM table 
GROUP BY nameId


I think that will do it.

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] Re: Is this possible?

2005-01-23 Thread Samar
On Mon, 24 Jan 2005 05:20:20 +1100 (EST), JeRRy <[EMAIL PROTECTED]> wrote:
> Let me explain this a bit better, or try to. ;)
> 
> Let's say I have some code on MY SERVER.
> 
> I will call it "MYSERVER" and an outside server
> outside my local area "OUTSIDESERVER".
> 
> Now I have PHP on "MYSERVER" to connect to a database
> on an "OUTSIDESERVER" and once establish do a few
> updates/deletes etc.
> 
> Now the database names, passwords etc will be stored
> on "MYSERVER" which uses input themself to save.
> 
> Now is this method security safe and possible or are
> most servers setup to a DB connection can only be made
> by "localhost"?
> 
> J

Security-safe, I don't know. :) Possible, yes. You can configure from
what host a particular user can be allowed to login. That's what
_host_  columns in the mysql databases' tables and the _host_ table
define.

I hope I am getting you right. :)

Regards,
Samar M.  aka Knight Samar

= Warning: Dates in Calendar are closer than they appear.

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP-DB] Re: Is this possible?

2005-01-23 Thread Bastien Koert
Depends on what you mean by security safe. Safe for sensitive data? Nope. 
Its all sent clear text over the net unless you use ssl encryption. You will 
need to alter the second remote db to accept a connection/account coming 
from your primary server. Your host may not allow that, you'll need to check 
with them.

If the user account/passwords are not securely stored on the 
server...outside the root in  protected directory, you may risk a hacker 
gaining access to both accounts (local and remote).

Can it be done safely? Sure. But you may need greater control over the 
servers than what the host(s) are willing to allow. There may be additional 
costs (SSL certificates, set-up charges etc)

Bastien
From: JeRRy <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] Re: Is this possible?
Date: Mon, 24 Jan 2005 05:20:20 +1100 (EST)
Let me explain this a bit better, or try to. ;)
Let's say I have some code on MY SERVER.
I will call it "MYSERVER" and an outside server
outside my local area "OUTSIDESERVER".
Now I have PHP on "MYSERVER" to connect to a database
on an "OUTSIDESERVER" and once establish do a few
updates/deletes etc.
Now the database names, passwords etc will be stored
on "MYSERVER" which uses input themself to save.
Now is this method security safe and possible or are
most servers setup to a DB connection can only be made
by "localhost"?
J

Date: Sun, 23 Jan 2005 15:51:02 +1100 (EST)
From: "JeRRy" <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: Is this possible?
Hi,
Is it "security safe and possible" to use my server to
query another server, outside the local zone, and make
updates to another server using a PHP page from my
server?
I'm just wondering.
So in other words I'd have a DB setup to hold users
domains, db names, db usernames, db passwords etc on
mine and run PHP code query their own on their server.
 I wanna do this to run a program I am working on and
wanna keep the code on my server rather than handing
it out to people to freely use.
Again the question is, is it security safe and
possible. :)
J
Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: Is this possible?

2005-01-23 Thread JeRRy
Let me explain this a bit better, or try to. ;)

Let's say I have some code on MY SERVER.

I will call it "MYSERVER" and an outside server
outside my local area "OUTSIDESERVER".

Now I have PHP on "MYSERVER" to connect to a database
on an "OUTSIDESERVER" and once establish do a few
updates/deletes etc.  

Now the database names, passwords etc will be stored
on "MYSERVER" which uses input themself to save.  

Now is this method security safe and possible or are
most servers setup to a DB connection can only be made
by "localhost"?

J



Date: Sun, 23 Jan 2005 15:51:02 +1100 (EST) 
From: "JeRRy" <[EMAIL PROTECTED]> 
To: php-db@lists.php.net 
Subject: Is this possible? 

Hi,

Is it "security safe and possible" to use my server to
query another server, outside the local zone, and make
updates to another server using a PHP page from my
server?

I'm just wondering.

So in other words I'd have a DB setup to hold users
domains, db names, db usernames, db passwords etc on
mine and run PHP code query their own on their server.
 I wanna do this to run a program I am working on and
wanna keep the code on my server rather than handing
it out to people to freely use.

Again the question is, is it security safe and
possible. :)

J


Find local movie times and trailers on Yahoo! Movies.
http://au.movies.yahoo.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php