You are here: Re: what will be the function for this « PHP Programming Language « IT news, forums, messages
Re: what will be the function for this

Posted by Hero Wanders on 11/11/21 11:17

Hello!

> I am unable to find the proper function to get the following.
> I have 2 cells with date and time in a table. I have to check if the
> combination of given date & time exists in the table before a new record is
> inserted.
> Any idea what function will do this?

I assume you are speaking about a DB table.
Try to check whether the resultset you get when querying the DB with
SELECT * FROM myTable WHERE (date = given_date) AND (time = given_time);

If the resultset is empty there is no such record.

Perhaps you want to use a PRIMARY KEY(date, time).

Greets,
Hero Wanders

 

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

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