Hello, How can I find out the day of week, using given date using php or mysql, I have searched for it on google and find out a mysql function DAYNAME but when I used this function the output is "Resource id#3" please help me in solving this.

Thanks

hello post your query structure...

<?php
mysql_connect("localhost", 'root', '12345678');
$d = mysql_query("SELECT DAYNAME('2000-01-09')")or die(mysql_error());
echo $d;
?>

what is the meaning of this line:
mysql_query("SELECT DAYNAME('2000-01-09')")

here you didn't mention table name...
make it correct and try again..

on original site it is used in this way.
mysql> SELECT DAYNAME('2000-01-01');

how can i store the resuilt of DAYNAME in a variable.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.