onenonly Posted May 30, 2009 Share Posted May 30, 2009 What is the best way of putting data into tbl1 after this query mysql_query("INSERT INTO ".$manga." (name, picture) VALUES('".$_POST["name"]."', '".$_POST["image"])."')"); I have mangaid to auto_increment I was think something like this but do you have a better way? $query = "SELECT mangaid FROM $manga WHERE name LIKE '%" . $_POST["name"] . "%' "; $results = mysql_query($query); etc TABLES: tbl1 : downloads downloadsid mangaid softwareid tbl2 : manga mangaid name picture tbl3 : software softwareid name picture Link to comment https://forums.phpfreaks.com/topic/160232-solved-php-mysql-insert/ Share on other sites More sharing options...
PFMaBiSmAd Posted May 30, 2009 Share Posted May 30, 2009 http://us.php.net/mysql_insert_id Link to comment https://forums.phpfreaks.com/topic/160232-solved-php-mysql-insert/#findComment-845487 Share on other sites More sharing options...
onenonly Posted May 30, 2009 Author Share Posted May 30, 2009 wow my friend you are the best I really appreciate your help now how do I make this post say answered? Link to comment https://forums.phpfreaks.com/topic/160232-solved-php-mysql-insert/#findComment-845495 Share on other sites More sharing options...
Ken2k7 Posted May 30, 2009 Share Posted May 30, 2009 Click on Topic Solved link near the bottom left. Link to comment https://forums.phpfreaks.com/topic/160232-solved-php-mysql-insert/#findComment-845502 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.