[PHP-DB] timestamp problem

2004-11-18 Thread Doug Parker
I'm trying to format a MySQL Timestamp Column Type with PHP, and it's not going well. In reading up on it, I see that the idea is to convert the Timestamp type to Unix format using the strtotime() function, then using the date() function to format that result. However, this only appears to work

Re: [PHP-DB] timestamp problem

2004-11-18 Thread Doug Parker
, DATE_FORMAT('%m %d %Y', projects.Date2) AS Date2,... etc any other suggestions? John Holmes [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Doug Parker wrote: I'm trying to format a MySQL Timestamp Column Type with PHP, and it's not going well. In reading up on it, I see

[PHP-DB] Selecting between using letters

2003-12-29 Thread Doug Parker
How would I create a select statement in MySQL that would return a range of records from the LastName field where the value starts with a designated letter - for example, returning the range where the first letter of LastName is between A and E... Any help would be greatly appreciated.

[PHP-DB] query problem

2003-10-02 Thread Doug Parker
I'm having a problem with a specific query. SELECT DISTINCT(contents_.company_id), companies.* FROM contents_, companies WHERE contents_.Products LIKE '%heating%' OR contents_.Manufacturer LIKE '%heating%' AND contents_.company_id = companies.id The query works fine without the OR segment, for

Re: [PHP-DB] retrieve last n records

2003-03-06 Thread Doug Parker
OK, I would like to do it with the method you suggested. However, I'm having a few problems. Firstly, I can't seem to figure out how to sort rows returned from mysql_fetch_array. sort() or any other array function won't work because each row is an array, and I need to sort by the column.

[PHP-DB] export query

2003-01-15 Thread Doug Parker
I need to essentially take a query and make it into a table. I'll first settle for the ability to export the query into a text file, somehow delimited. Can anyone help me with this? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] join query/relational database question

2003-01-06 Thread Doug Parker
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

[PHP-DB] Re: approaching a relational database

2002-12-16 Thread Doug Parker
experienced in database design, so i figured i'd ask. Thanks, Doug Stas Trefilov wrote: Doug Parker wrote: I'm about to embark on a project where I have to enter many, many fields into a MySQL database, and I don't know how to approach the database structure. The data is statistics for a golf

[PHP-DB] Re: approaching a relational database

2002-12-16 Thread Doug Parker
by introducing the foreign key field that references the course table) However, if I understand it correctly you are proposing to have a separate table for each hole attribute (1 table for par, 1 table for WH etc.. etc..) which is messy and unnecessary.) Good luck David Eisenhart Doug Parker [EMAIL

[PHP-DB] approaching a relational database

2002-12-15 Thread Doug Parker
I'm about to embark on a project where I have to enter many, many fields into a MySQL database, and I don't know how to approach the database structure. The data is statistics for a golf course. There are 18 holes, and each hole has a Red Tee Par, White Tee Par, and Blue Tee Par, which is 54