[PHP-DB] More than 50 entries!!!

2009-07-10 Thread Emiliano Boragina
Hi, I must to do a Admin to insert 50 entries on a table.

I solve it creating 4 tables in my PHPMyAdmin:

1) primary data

2) sec data

3) other data

4) pictures, almost 10 per product

 

How do I do to insert the data about the same product in 4 tables, and then
print them in the appropriate section on the web?

How do I do, the SELECT, INPUT and UPDATE to the 4 tables?

 

And how do I do a search with this 4 tables strucutre?

Thanks a lot!

 

+  _
   // Emiliano Boragina _
   // Diseño  Comunicación //
+  _
   // emiliano.borag...@gmail.com  /
   // 15 40 58 60 02 ///
+  _

 



Re: [PHP-DB] More than 50 entries!!!

2009-07-10 Thread kranthi
assign every product an unique product id. this can be done by an auto
increment value in the primary table, then use mysql_insert_id() to
get the product id.

thereafter use the unique product id to refer to the product (in the
database tables)

--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] More than 50 entries!!!

2009-07-10 Thread WenDong Zhang
why separate the products to 4 table?

On Fri, Jul 10, 2009 at 4:54 PM, kranthi kranthi...@gmail.com wrote:

 assign every product an unique product id. this can be done by an auto
 increment value in the primary table, then use mysql_insert_id() to
 get the product id.

 thereafter use the unique product id to refer to the product (in the
 database tables)

 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
Best Regards!
Wen Dong


Re: [PHP-DB] More than 50 entries!!!

2009-07-10 Thread kranthi
because 2,3,4 tables have one to many corespondence. (at least 4 table does)


Re: [PHP-DB] More than 50 entries!!!

2009-07-10 Thread Zareef Ahmed
On Fri, Jul 10, 2009 at 3:03 PM, kranthi kranthi...@gmail.com wrote:

 because 2,3,4 tables have one to many corespondence. (at least 4 table
 does)


Every heard about SQL joins?

-- 
Zareef Ahmed :: A PHP Developer in India ( Delhi )
Homepage :: http://www.zareef.net


Re: [PHP-DB] More than 50 entries!!!

2009-07-10 Thread Zareef Ahmed
On Sat, Jul 11, 2009 at 5:51 AM, Zareef Ahmed zareef.ah...@gmail.comwrote:



 On Fri, Jul 10, 2009 at 3:03 PM, kranthi kranthi...@gmail.com wrote:

 because 2,3,4 tables have one to many corespondence. (at least 4 table
 does)


 Every heard about SQL joins?


I was just purposing a reading about SQL joins and primary keys :)







 --
 Zareef Ahmed :: A PHP Developer in India ( Delhi )
 Homepage :: http://www.zareef.net




-- 
Zareef Ahmed :: A PHP Developer in India ( Delhi )
Homepage :: http://www.zareef.net


[PHP-DB] resize 10 upload image

2009-07-10 Thread Emiliano Boragina
Hi again…

How do I do to resize more than one image when I upload using php and not
any library like the “gd”

I have this:

 

$folder=../products;

copy($_FILES['5']['tmp_name'],$folder.'/'.$_FILES['5']['name']);

$picture5=$_FILES['5']['name'];

copy($_FILES['6']['tmp_name'],$folder.'/'.$_FILES['6']['name']);

$picture5=$_FILES['6']['name'];

.

.

.

 

thanks

 

+  _
   // Emiliano Boragina _
   // Diseño  Comunicación //
+  _
   // emiliano.borag...@gmail.com  /
   // 15 40 58 60 02 ///
+  _

 



[PHP-DB] mysql_insert_id() and JOIN

2009-07-10 Thread Emiliano Boragina
Hi again…

I dont understand how to use this two…

I read php.net and other sites, but dont understand...

 

I have this four tables: table1, 2, 3 and 4

So the SELECT is like this?:

?

$query_select = SELECT * FROM table1 FULL JOIN table2 FULL JOIN table3 FULL
JOIN table4 ON table1.id=table2.id=table3.id=table4.id ORDER BY id ASC”;

mysql_query($query_select);

?

This is with FULL JOIN... How identificate the left table if I want to use
LEFT JOIN?

How is the UPDATE?

And the INSERT I dont understand yet how is it?

I’m not to do a link between tables in PHPMyAdmin?

 

Thank you very... VERY... much!

+  _
   // Emiliano Boragina _
   // Diseño  Comunicación //
+  _
   // emiliano.borag...@gmail.com  /
   // 15 40 58 60 02 ///
+  _