[PHP-DB] formatting a date from mysql

2005-12-12 Thread Eternity Records Webmaster
I need to figure out how to format the date format: year-month-day (2005-12-06). It is a date(8) field in a mysql table that i pulled out of the table with php 5.0.5. I need it in the format: Tue December 6, 2005 (or in mysql's formatting: 6-12-2005). I am using the reformatting for display only.

Re: [PHP-DB] formatting a date from mysql

2005-12-12 Thread Adrian Bruce
farily straight forward to withinn the query itself, check out http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html or for php http://uk.php.net/date RTFM Regards Adrian Eternity Records Webmaster wrote: I need to figure out how to format the date format: year-month-day

[PHP-DB] Re: formatting a date from mysql

2005-12-12 Thread El Bekko
Eternity Records Webmaster wrote: I need to figure out how to format the date format: year-month-day (2005-12-06). It is a date(8) field in a mysql table that i pulled out of the table with php 5.0.5. I need it in the format: Tue December 6, 2005 (or in mysql's formatting: 6-12-2005). I am using

Re: [PHP-DB] Minor Change

2005-12-12 Thread Micah Stevens
You're getting an error, after the query, put: echo mysql_error(); to find out what's happening. On Monday 12 December 2005 11:05 am, [EMAIL PROTECTED] wrote: I made tiny changes to my php file and sql table and the table won't come up. I updated the table name (and php file name) from

[PHP-DB] Need a Help!

2005-12-12 Thread Mohamed Yusuf
I have table and insert data using song_id, that means one artist can have many song_ids. my question is how can I query distinct artist with his/her song_id while I will not get duplicate data like duplicate artist? my code is like this $content .=form id=\form1\ method=\post\ action=\\ select

Re: [PHP-DB] Minor Change

2005-12-12 Thread kc68
After adding echo mysql_error(); I get the same result. I tried changing the query to include 109fh7 (a table which doesn't exist) and got the same result as with 109fh6. Changing to 109fh5 does pull up that table. The line to which the error message refers is while ($row =

Re: [PHP-DB] Minor Change

2005-12-12 Thread dpgirago
Ken: Echo out the query. Check it. Run it from the MySQL client. What does the error message say? Does the table 109fh6 actually exist in the database? David # Ken responded: # # After adding echo mysql_error(); I get the same result. I tried changing # the query to include 109fh7 (a

Re: [PHP-DB] Minor Change

2005-12-12 Thread tg-php
This isn't really a MySQL error (sorta), it's a PHP error. You probably forgot to update a variable name when you updated everything else. Here's an example sequence for querying using PHP/MySQL: $TestQY = SELECT * from SomeTable; $TestRS = mysql_query($TestQY) or die(Error executing query);

Re: [PHP-DB] Need a Help!

2005-12-12 Thread tg-php
Couple of things you can do: 1. Drop the song ID and only get the artist information SELECT distinct(Artist) from songtable. It doesn't look like your SELECT statement needs a song, but you include the song ID as $id anyway. Any reason for that or can you drop it so you only get artist? 2.

Re: [PHP-DB] Minor Change

2005-12-12 Thread Shahmat Dahlan
did it say which line does the error Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in is referring to. if it is referring to the line which contains the function call mysql_query (), dpirago is right, there could be some mistake in the sql statement.