empty result

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pppswing
Forum Commoner
Posts: 33
Joined: Thu Jun 10, 2004 2:04 am
Location: Tallinn, Estonia

empty result

Post by pppswing »

Hello,

I have a query

$query= "SELECT DATE_ADD('".$mydate."', INTERVAL 1 HOUR)";

that gives a good result on phpMyAdmin.

But when I do in php

$result = mysql_query($query);

$result is empty, I can't undersdand why
I've done a mysql_error() but there is no error and the database link is OK,

I can do other queries previously but when I'm trying to get the date it doesn't work.

Thanks,
:)
User avatar
papa
Forum Regular
Posts: 958
Joined: Wed Aug 27, 2008 3:36 am
Location: Sweden/Sthlm

Re: empty result

Post by papa »

pppswing
Forum Commoner
Posts: 33
Joined: Thu Jun 10, 2004 2:04 am
Location: Tallinn, Estonia

Re: empty result

Post by pppswing »

No, the problem is that $result is empty

I know how to retrieve the data with mysql_result($result,0,0); this part is OK but I can't get any result and any error !
Post Reply