[PHP-DB] selecting rows with no reference

2004-12-08 Thread Merlin
Hi there, I know this is a question for the mysql mailing list, but maybe one of you guys also could help out with that. I do have to tables (users, messages). Now there unfortunatelly are some messages where the sender in the user table is missing. I am trying to find all messages which do

[PHP-DB] A language question

2004-12-08 Thread Bruno B B Magalhães
Hi guys, I am thinking about content translation... Current I am using for example: contentId | contentTitle | contentBody | contentLanguage So each row has its own language definition... But would it be better using cols as language fields and retrieve only need cols...: contentId |

Re: [PHP-DB] selecting rows with no reference

2004-12-08 Thread Brent Baisley
This is probably what you are looking for: SELECT m.subject,m.status,u.user_id FROM messages m LEFT JOIN user u ON m.sender_user_id=u.user_id WHERE u.user_id IS NULL That will give you all message without a related user. On Dec 8, 2004, at 6:30 AM, Merlin wrote: Hi there, I know this is a question

[PHP-DB] A language mather

2004-12-08 Thread Bruno B B Magalhães
Hi guys, I am thinking about content translation... Current I am using for example: contentId | contentTitle | contentBody | contentLanguage So each row has its own language definition... But would it be better using cols as language fields and retrieve only need cols...: contentId |

RE: [PHP-DB] selecting rows with no reference

2004-12-08 Thread Bastien Koert
is the user id still there? if not, an outer join should be what you need to use to get all the rows where there is no match in the other table bastien From: Merlin [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] selecting rows with no reference Date: Wed, 08 Dec 2004 12:30:34 +0100 Hi

RE: [PHP-DB] A language question

2004-12-08 Thread Norland, Martin
I agree with this wholesale, except one thing should be noted... If this content ever changes, and you need to be noting that, you'll need some way of tracking what's been retranslated and what hasn't. If it never changes - consider yourself lucky, but as someone who works with a translated app,

[PHP-DB] select particular columns in query

2004-12-08 Thread blackwater dev
Hello, I want to create a new row in the db by copying an existing one. My db has an auto incrementing id so I can't simply do insert into cars select * from cars where id=$id as this throws the primary key error. How can I do this with out specifying each column? Thanks! -- PHP Database

RE: [PHP-DB] select particular columns in query

2004-12-08 Thread Bastien Koert
INSERT INTO `dbname`.`newtablename` SELECT * FROM `dname`.`oldtablename` ; bastien From: blackwater dev [EMAIL PROTECTED] Reply-To: blackwater dev [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [PHP-DB] select particular columns in query Date: Wed, 8 Dec 2004 10:46:44 -0500 Hello, I want to

Re: [PHP-DB] select particular columns in query

2004-12-08 Thread Doug Thompson
The manual is your friend. You cannot execute the SQL statement you provided because mysql specifically disallows it: http://dev.mysql.com/doc/mysql/en/INSERT_SELECT.html Same reference, your presumption about auto-increment columns is also wrong. Doug blackwater dev wrote: Hello, I want to

Re: [PHP-DB] stumped-mail and database

2004-12-08 Thread Stuart Felenstein
--- Stuart Felenstein [EMAIL PROTECTED] wrote: --- Jason Wong [EMAIL PROTECTED] wrote: Also just to be certain that you *are* running those lines of code change the echo $to, to echo Before $to echo After $to or something. Some may remember my problem the other day where I

Re: [PHP-DB] A language question

2004-12-08 Thread Bruno B B Magalhães
Thanks a lot Koert and Norland! Do you know any GOOD multilingual system just to have a look at, how they handles those versions? Best Regards, Bruno B B Magalhaes On Dec 8, 2004, at 12:06 PM, Bastien Koert wrote: the first way is better, the second creates a wider table, and what happens when

Re: [PHP-DB] A language question

2004-12-08 Thread Bruno B B Magalhães
Thanks a lot Koert and Norland! Do you know any GOOD multilingual system just to have a look at, how they handles those versions? Best Regards, Bruno B B Magalhaes On Dec 8, 2004, at 12:06 PM, Bastien Koert wrote: the first way is better, the second creates a wider table, and what happens when

Fwd: [PHP-DB] select particular columns in query

2004-12-08 Thread Ross Honniball
I assume you want to do this within PHP and not native Sql? Copy sqlSet function below. You could then, for example, code: // Get data into an associative array by whatever db extraction level you are using with query like: // SELECT * FROM table-name WHERE id = 123 // and put data in assoc array