473,405 Members | 2,171 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,405 software developers and data experts.

Adding rows to a database

Hi.

Trying to create a program which splits up a large amount of text into
small pieces, puts these pieces into a database, allowing for later
reuse.

The problem is since each text file is a different size in length i
can't reprogram the right amount of tables without manual work.

I've tried importing the files through the database in a array, it
converts it into a string containing "array"

So, either

1:can you add database rows onto a table after creation?

2: Is there any way to descramble the array package to grab each
individual variable?

I'm still a beginner to PHP and MySQL so apologise if this is something
basic.

BTW: I use php 4.

Dec 17 '06 #1
2 1357
>Trying to create a program which splits up a large amount of text into
>small pieces, puts these pieces into a database, allowing for later
reuse.

The problem is since each text file is a different size in length i
can't reprogram the right amount of tables without manual work.
A database field such as MySQL's 'text' type (or 'long text') allows
a lot of flexibility in stuffing whole files into a database field.
Even 'varchar' is good for relatively short strings that vary in length.
>I've tried importing the files through the database in a array, it
converts it into a string containing "array"
Databases in general do not have an 'array' type for a field. An
array is typically represented in a table having columns for "which
array", "array subscript (for multidimensional arrays you may have
more than one column here)", and "value", and having one row for
each array element.
>1:can you add database rows onto a table after creation?
Rows, yes, databases would be useless if you can't put data in them.
Columns, yes, if you have privileges to alter the schema, but having
a dynamic schema is generally a very, very bad idea.
>2: Is there any way to descramble the array package to grab each
individual variable?
What's an "array package"? Are you referring to serialize() and
unserialize()? You can serialize() an array, store it in a database,
and fetch it later and unserialize() it to use it. However, you
can't generally have the database meaningfully look at what's inside
the serialize()d array.
>I'm still a beginner to PHP and MySQL so apologise if this is something
basic.
Dec 17 '06 #2
On 17 Dec 2006 11:04:35 -0800, in comp.lang.php "conspiracy cam"
<mo******@gmail.com>
<11**********************@l12g2000cwl.googlegroups .comwrote:
>| Hi.
|
| Trying to create a program which splits up a large amount of text into
| small pieces, puts these pieces into a database, allowing for later
| reuse.
|
| The problem is since each text file is a different size in length i
| can't reprogram the right amount of tables without manual work.
|
| I've tried importing the files through the database in a array, it
| converts it into a string containing "array"
|
| So, either
|
| 1:can you add database rows onto a table after creation?
|
| 2: Is there any way to descramble the array package to grab each
| individual variable?
|
| I'm still a beginner to PHP and MySQL so apologise if this is something
| basic.
|
| BTW: I use php 4.
Post about ten lines of the sample data. Remove any sensitive data
before hitting the send button.
---------------------------------------------------------------
jn******@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Dec 17 '06 #3

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

Similar topics

2
by: Viorel | last post by:
Adding new row with default values. In order to insert programmatically a new row into a database table, without direct "INSERT INTO" SQL statement, I use the well-known DataTable.NewRow,...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
by: Robin Thomas | last post by:
I am fairly new to ASP.NET so I think I am missing something fundamental. Anyway, quite often I am pulling data from a database, but then I need to use that data to produce more data. A simple...
1
by: Andrew | last post by:
Hey all, I am very new to ASP.Net (and .Net in general), but that isn't stopping the boss from wanting to begin new projects in it. This latest project has me kinda stumped and after a couple...
10
by: Trevor | last post by:
Hey, I am trying to do this tutorial on the microsoft site : http://msdn.microsoft.com/library/default.asp? url=/library/en-us/dndotnet/html/usingadonet.asp I can get everything to work up to...
2
by: Niels Jensen | last post by:
I have the following code in a Sub which is called by a do loop statement for each line starting with unit info in an e-mail based game that I play. I'm exctracting the keywords from the text and...
6
by: Rudy | last post by:
Hi all, I know this is easy, just can't seem to get it. I have a windows form, and a text box, with a value already in it. I need to add that value to a table. It's just one value, so the entire...
12
by: JMO | last post by:
I can import a csv file with no problem. I can also add columns to the datagrid upon import. I want to be able to start importing at the 3rd row. This will pick up the headers necessary for the...
0
by: ganesh22 | last post by:
Hi... Iam using GridView in asp.net(2.0) .My requirement is user can add,update,delete in gridview I written the code for add & update but can u help adding rows in grid view My code: ...
2
by: canoewhiteh2o | last post by:
I am having trouble adding data columns to a disconnected database. I first load a datatable using: private DataTable dtMacros = new DataTable(); private ArrayList macro = new ArrayList();...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.