You are here: Newbie - getting row just inserted « PHP SQL « IT news, forums, messages
Newbie - getting row just inserted

Posted by listerofsmeg01 on 09/25/05 23:18

Hi all,

VERY new to php and mysql.

I have an autoincrement ID field that I want to retrieve after doing an
INSERT with msql_query.

I've tried doing a mysql_fetch_array on the result set returned from
the insert, but it doesn't like it.

What is the best way to get the record just inserted. Do I really need
to query the entire table again and order by ID? That seems incredibly
wasteful.

Thanks,
Lister

 

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

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