Jump to content

[SOLVED] php mysql insert


onenonly

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.