You are here: Re: [PHP] Code Check « PHP « IT news, forums, messages
Re: [PHP] Code Check

Posted by Dotan Cohen on 10/21/52 11:17

On 5/30/05, janbro <janbro@web.de> wrote:
> Hi List, I don't know where else to look. I've got PHP 5.0.0 and MySQL
> 4.1.3. (on Windwows XP with Apache 2.0.50)
>
> Here is my Code: the Query with the delete is not executed and I don't
> know why. If I copy it into the MySQL Command line like it is here,
> everything works fine. I have another example with a more simple delete
> which works (same syntax)
>
> If I replace the delete with the insert statement it works.
>
> What 'am I doing wrong here?
>
>
>
> > public function DeleteOldFails (){
> > $conClas=$this->con();
> > $con=$conClas->mysqlConnect ();
> >
> > $query = "DELETE FROM LoginTracker WHERE (UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - UNIX_TIMESTAMP(DateAttack)) > 3600;";
> > // $query ="INSERT INTO LoginTracker (IPAttack, User) VALUES ('127.0.0.1','user')";
> > echo "$con<br>Diesen Auf ERFOLG TESTEN! LÖSCHT ER WAS ER SOLL? <br>$query<br>";
> > print $con->query($query);
> > $con->query("OPTIMIZE TABLE LoginTracker ");
> >
> > $this->discon ($conClas, $con);
> > }
>
> thx
> janbro
>

-snip-
$query = "DELETE FROM LoginTracker WHERE
(UNIX_TIMESTAMP(CURRENT_TIMESTAMP) - UNIX_TIMESTAMP(DateAttack)) >
3600;";
-snip-

Take out that ; after the 3600!

Dotan Cohen
http://lyricslist.com/lyrics/pages/artist_albums.php/345/Metallica

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация