You are here: Re: using UPDATE in MySQL « All PHP « IT news, forums, messages
Re: using UPDATE in MySQL

Posted by Jerry Stuckle on 04/24/06 21:06

Martin Jay wrote:
> In message <3avk42ha27snejlt1f7q5uvvc35vni2glq@4ax.com>, cover
> <coverlandNOSPAM914@yahoo.com> writes
>
>> On Sat, 22 Apr 2006 10:59:05 -0700, cover wrote:
>>
>> So I guess in short, what I'm looking for is a single field text
>> search to populate table 3 where the successful query result of this
>> form:
>
>
> $find=$_POST['equipno'];
> $table = /* name of your MySQL table */
>
> /* Connect and select your database as in input file */
>
> $item = mysql_query("SELECT * FROM $table WHERE equipno = '$find'");
>
> Then:
> $item['id'] is your id;
> $item['date1'] is your first date;
> $item['date2'] is your second date;
>
> etc.
>

Not quite.

$result = mysql_query("SELECT * FROM $table WHERE equipno = '$find'");
$item = mysql_fetch_array($result);

NOW:
$item['id'] is your id;
$item['date1'] is your first date;
$item['date2'] is your second date;

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

 

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

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