[PHP-DB] select distinct + id
i have a table like this +---+-+--+-+-++ | Field | Type| Null | Key | Default | Extra | +---+-+--+-+-++ | id| int(100) unsigned | | PRI | NULL| auto_increment | | dir_name | varchar(255)| YES | | NULL|| | file_name | varchar(255)| YES | | NULL|| --- and i want to do the following select : select distinct dir_name, file_name from tablename where dir_name like "%th_same_foo%" or file_name like "%the_same_foo%" ; but i also wont to have the id's of fields i've selected, and it makes no sense to put select distinct id, dir_name, ... cause a primary key is always distinct does anyone know how to do all this in one select statement? thanks in advanse -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Error messge regarding session variables
i've got error message when i put some session variables on my pagge: Warning: Cannot send session cookie - headers already sent by (output started at /home/httpd/vhosts/coliba.freephp.digiro.net/htdocs/user/index.php:4) in /home/httpd/vhosts/coliba.freephp.digiro.net/htdocs/user/index.php on line 6 Anyone can expline me whta does it mean? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] Error in non existing line
Parse error: parse error in /home/httpd/.../htdocs/index.php on line 90 And I have just 89 lines Here are the last linse from index.html: -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]