473,396 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

script in database

E
I have two tables and i want join the two of the primary id's in to one
table. the database is mysql.

ex.

Table Item (ID int(10) NOT NULL auto_increment)
Table Actor(ID int(10) NOT NULL auto_increment)

to go in to
Table actor_item(actor_id, item_id)

so i was wondering the perl script to do that
Jul 19 '05 #1
1 1829
E
i didnt give enough info. i have info in a text file and have got perl to
print it out and now i want to add them to my database.
my tables look like this
Item (Id int(10) NOT NULL auto_increment, genre, title, price, quantity,
descrb, image, length, numdvd, rating, primary key is Id)
actor ( Id int(10) NOT NULL auto_increment, people_id, chara, primary key is
Id)
director (Id int(10) NOT NULL auto_increment, people_id, primary key is Id)

these represent my items from the text file. I have it to know that $title
means the tile in my text file.
$price, $image, $title, $director, $rating, $num_dvds, $length, $genre,
$$aref[0] (actor), $$aref[1] (character), $stock.
in the actor_item table: the actor matches up with what movies he is in
actor_id item_id
1 1
1 2 this shows same actor but different
movie

so how do i populate the actor_item table?
----- Original Message -----
From: "E" <ep*****@triad.rr.com>
Newsgroups: comp.lang.perl
Sent: Thursday, April 15, 2004 11:59 PM
Subject: script in database

I have two tables and i want join the two of the primary id's in to one
table. the database is mysql.

ex.

Table Item (ID int(10) NOT NULL auto_increment)
Table Actor(ID int(10) NOT NULL auto_increment)

to go in to
Table actor_item(actor_id, item_id)

so i was wondering the perl script to do that
"E" <ep*****@triad.rr.com> wrote in message
news:9S*******************@twister.southeast.rr.co m... I have two tables and i want join the two of the primary id's in to one
table. the database is mysql.

ex.

Table Item (ID int(10) NOT NULL auto_increment)
Table Actor(ID int(10) NOT NULL auto_increment)

to go in to
Table actor_item(actor_id, item_id)

so i was wondering the perl script to do that

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: mikey_boy | last post by:
Hello! Curious if anyone could give me a hand. I wrote this PHP script with makes a simple connection to a mysql database called firstdb and just pulls back the results and displays on the...
5
by: Tim Morrison | last post by:
Is there any easy way to create a change script as illustrated below for all tables within a database? Right now I would have to create a seperate script for each table. I would like to be able...
6
by: Clay Beatty | last post by:
When you create database diagrams in Enterprise Manager, the details for constructing those diagrams is saved into the dtproperties table. This table includes an image field which contains most of...
1
by: Tim Pascoe | last post by:
I've been trying to get the scripts posted earlier to the group by Clay Beatty to work properly. Using the three components he posted, I have managed to get a new SP generated. However, when I...
2
by: Bobby | last post by:
Hello everyone I have a question. The school I am working for is in the beginning process of having a webpage that will direct students to download there homework and be able to view there info...
5
by: news | last post by:
I have a new situation I'm facing and could use a suggestion or two, as I don't seem to be able to think in the abstract very well. We have a local server which holds all of our image files. We...
1
by: Chris Zopers | last post by:
Hello, I want to generate a SQL Script of a SQL Server database. To do this, I right-click the database name and choose the option All Tasks/Generate SQL Script. Than I get a text file with a...
9
by: Jerim79 | last post by:
I am no PHP programmer. At my current job I made it known that I was no PHP programmer during the interview. Still they have given me a script to write with the understanding that it will take me a...
3
by: Inna | last post by:
Hello all, I am looking for the script, which I believe exists already.I need to be able to populate the script for security of one database and apply it to another database, even if it is located...
10
by: Jerim | last post by:
I am attempting to put together one script that pulls data from one database on its own server, and data from another database on its own server, which is off-site. Server 1 - Only allows shared...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.