Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MYSQL






SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Storing Data How It Is Typed


For some reason when a reply is added is doesnt take into account any new lines ie, if someone has pressed enter in their reply to start on a new line, upon it being stored in the database this disappears. So when the response is then viewed it is just one constant paragraph with no breaks.

I know this is probably just something simple maybe with how i have the textarea set up or data type in my database.




View Complete Forum Thread with Replies
Sponsored Links:

Related Messages:
I Typed S And It Said No Databases
How would I make a page on an Apache2 Server running off my computer connect to a MySQL Server also installed on my computer? And I think I have a database but when I go to Command Prompt it says "No Database" how would I fix this.

View Replies !   View Related
.NET Typed Datasets
Is it possible at all to have VS.NET create a strongly typed dataset from an existing MySQL DB? With MS SQL, you can create a DataAdapter for each db table, then have it generate the dataset with accompanying relationships.

Both .Net Connectors don't even allow the option to 'Generate Dataset' from a DataAdapter, and the ODBC one errors when running the wizard. (I've tried 3.51-2 and the v5 Alpha)

As I'm new to MySQL, I might be missing a more simple way of creating a dataset from a MySQL db.

View Replies !   View Related
Storing Data
Unfortunately when I was installing FreeBSD, its handbook told me that
/var should be around 256 MB or so.

Now, since /var is near to the edge of the hdd, it is fast and now I
can't store my 2 GB+ mysql data on /var.

I'm storing the mysql data on /usr partition which is 60 GB big.

Are there any performance implications on my approach ?

View Replies !   View Related
Data Storing
As far as I understand numbers are in MySQL database kept as binary.
I was wondering how is data in column of type "CHAR" or "TEXT"
kept in database:
for example if I eneter "Today is Thursday and I do not go to work." in column "CHAR"
Is every letter translated into binary ?

View Replies !   View Related
Storing Data From Xml
I am getting xml file as input. Now I have to parse the xml and store the value in table.Can anyone give the code for this.

View Replies !   View Related
BLOB For Storing Data
I'm implementig a java web application using MySQL as database.

The main function of the application is basically to redistribuite
documents. Those documents (PDF, DOC with an average size around 2Mb)
are stored in BLOB column.

The amount of documents for the first year should not exceed 5/6 Giga,
but I cannot make prevision for the next years.

Those documents are mainly just accessed (update and delete are not so
common operation)

I would like to know if someone else is using a similiar approach.
If so, it is scalable?

View Replies !   View Related
Storing List Data
How would a set of related values be stored together in a MySQL db?

For example, if I wanted to store a user's buddy list, then the way I can think of would be something like this:

user | friend

John | Jim

John | Bob

John | Amy

Bob | Jim

Bob | Amy

So John's friendlist would include Jim, Bob, and Amy, and Bob's friendlist would include Jim and Amy. But it seems really inefficient to create a new row every time a new entry in the list is needed

I want to be able to store values like this:

user | buddylist

John | Jim,Bob,Amy

Bob | Jim,Amy

What would be the most efficient way to do this?

View Replies !   View Related
Standards For Storing Data.
I'm looking for some standard guidelines for storing common types of data in MySQL. For example, storing things like telephone numbers as integers vs. varchar, etc.

I am NOT looking for tutorials or howtos, just some general information on the most common / effecient ways of handling the sorts of common information.

View Replies !   View Related
Storing Unstructured Data
Can MYSQL store unstructured data like pictures, audios, video files?

View Replies !   View Related
Storing Calendar Data
I am working on creating an application (in PHP, MySQL, Apache) for ONLINE BOOKING OF MEETING ROOMS in a building.if anyone could let me know how to go about the BACK END design. Basically, how to store calendar data in the database.

View Replies !   View Related
Storing Data In Variables
I am trying to get the results from a unix command stored into a field or user variable.
I am using the new in version 4 system of ! command.

Something like this.

mysql> set @pass = ! ~/setpasswd testing ;

But it just returns the value to the screen and does not store it in the variable.
$1$Q4c8v6rK$hmVLelRR/j6Pabpw2ILUy.

The setpasswd script is just a csh script that says
openssl passwd -1 $1

Which take input in this case the string "testing" and returns a unix crypt_MD5 salted password.

View Replies !   View Related
Storing Binary Data
I am just starting to get into MySQL and PHP. I am using Apache as well.
I have read 2 things: You can store binary data in your MySQL database in a BLOB or text type OR
you can store binary data on the file system and then store pointers to files in My SQL.
I am not all the savvy on the tech talk but I want to know how to do the latter (specifically PDF documents). I have figured out the first way (as there seems to be much more information about this) but I want to know how to do the second version.

View Replies !   View Related
Storing And Searching Boolean Data
I'm creating a person_profile table and plan to be searching on gender. I'm wondering what the least costly setup is. I'm optimistically assuming there could eventually be millions of rows. I had planned to use a tinyint flag but have learned that creating an index on a boolean type column is ill-advised if not impossible. Would it be more efficient to just have a separate male table and female table? If so, there are other independant, potentially searchable columns in the profile table too that will have only a few (3-10) possible values. Should all of these be broken off into separate tables too? Is there a general percentage rule that you go by? Like, if one value takes up x percentage or more of your index, then an index is not advised?

View Replies !   View Related
Data Type For Storing Time
I need to store times in my database. The times will be in the format of 10:15.03 minutes:seconds.milliseconds.

Which data type should I select for the field in the table? I will want to be able to sort them into order ie quickest first and also calculate the differences between each time.

View Replies !   View Related
Table Sizes And Storing Uploaded Data
I intend to give my website users an option to upload relatively large files via a PHP script. My question is, is it feasible (and a good idea?) to store all the data (potentially several GB) in one table that will then have to be accessed by the server quite heavily at runtime?

Alternatives would be to split the table at a certain size threshold or to store just the filenames in MySQL and the corresponding files directly on the HD. Does anyone know how LAMP sites that offer large-scale upload services usually handle this?

View Replies !   View Related
Most Efficient Way Of Storing Data From Multiple Accounts
As part of a system I am putting together I need to allow users to create thier own accounts on my servers. Each user can create their own account, and then have their users register for it. Each account needs it data seperate from the others, a member registered for one account should not be able to view another account and a username registered with one account should still be available to the other accounts.

The ways I have been looking at are:

1. Create a new database for every account created so that all users are kept in seperate databases.

2. Have one table for users, one for topics, one for posts etc and then associate each row within this table with the relevent account. So for example a user could register with the forum with the ID 4, so their user entry would be

Userid: 234
Username: xxxx
Password: xxxx
Forumid: 4

Then when a new member registers with any account I simply check that there is not another user with the same account ID and username. Indexes on relevent fields in this system could help speed up huge tables.

I expect to quickly have 20,000 plus accounts (and in theory it could go up to hundreds of thousands).

I guess my question is which of these methods is better from a speed point of view once we get a large number of accounts and users. Also, are there restrictions on the number of fields in a table that could cause problems?

Using MySQL by the way, on an Apache server.

View Replies !   View Related
Storing Serializd Data In MySQL Table
I have some serialized data that I would like to store in a MySQL database. When viewed, the serialized data looks like this:....

View Replies !   View Related
Storing A Large Data Struct/object In MYSQL
I have the following structure.

typedef __nogc struct RemoteDisplayInfoType{
int HistData [512][512];
int channelNdx;
double xVar[2];
double yVar[2];
double paAngle[2];

}RemoteDisplayInfoType;

I want to store this in MySQl database and retreive it back. I am using ADO.Net with managed c++.

View Replies !   View Related
“best-practice” Approach For Storing Form Structures And Their Data
I’m looking for a “best-practice” approach to creating a db structure that will handle form creation and storage dynamically.

FORM CREATION
The idea is to allow the client to create forms for their products by specifying attributes and values that belong to a product category.

The client will:
1.Enter a category # and name.
2.Enter the attributes available to the category.
3.Enter the values available for those attributes.

The application will:
4.Deduce the form based on what the client enters.

FORM STORAGE
What’s the best approach for then storing the form attribute/value pairs?

Is this a “wise” approach or is better to "hard-code" the forms with html and/or use a look-up table for the allowed attribute values of the fields? Do any of you have experience with this concept? Do you have any thoughts on it or a link to further reading?

View Replies !   View Related
Storing As An Array - Vs. - Storing In A Relational Table
Store in a relational table

Code: [.....]

Scenario 1 would have more complex table joins, but would establish the ground rules using the table's naming conventions. Scenario 2 seems like the better option because it is easier to read and write to and rely s on the programming language to do the heavy lifting. For example, to read the array's stored, I would have to use a script function to determine what array=1 is and give it a value beforehand using a script. Where the first scenario, I would just pull the value from the table for array=1.

View Replies !   View Related
Storing 30.00
to store this in mysql, is this proper:

Code:

product_price float(4,2) unsigned NULL

View Replies !   View Related
Storing Pdb
I am in the process of creating a database that will store amongst otherthings, will need to store .pdb files and .vrml files. I am a bit confused as to go about it, as these files have to made accessible to the user- via a perl-cgi webpage. You get the idea- you search for something and you click on "get pdb file", and the user gets it. My question is this: Can i store files just in there .pdb form, or can a field only store the text that is in the pdb file. Is there a way to just put the file onto the web browser or will it have to be printed out via the cgi script onto the web browser line by line?

View Replies !   View Related
Storing UTF-8: Does BLOB
I'm trying to store UTF-8 texts into a mySQL database. These
texts contains Spanish special characters.

If I set field as VARCHAR and browse stored data, I get 'año'
instead of 'ao'.

But if I set field as BLOB, and I perform
SELECT * FROM my_table WHERE my_field LIKE '%ao%'
it does not work.

And
SELECT * FROM my_table WHERE my_field LIKE '%año%'
does work.

I would like to be able to work with right words... is it
possible?

View Replies !   View Related
Storing Dates
i'm currently working on a small php program to store details of petrol receipts. The part i'm stuck on is which field type to use to store the date. And then how to order the dates. i need to order by year then month and then day. I have no idea how to sort dates and need to be able to add receipts in any order.

*edit*

the date i want to store is in the format DD.MM.YYYY
the date is created via pull down menu's

View Replies !   View Related
Storing Images In DB
I have read some opinions stating that it is better to store images on the file system rather than the DB. And only note the image name in the DB/table for a reference. I was wondering of some experienced members could tell me if that is a better way of doing things or storing them in the DB is just fine?
Note: This is not for an enterprise level website. It is for a very small one.

View Replies !   View Related
Storing Images
I want to store images in mysql database, what should be the best choice. Issue is database size will grow on daily basis. what should be the best choice of storage engine.

- InnoDB
- myISAM

View Replies !   View Related
Storing Text
what the best way (date type) is to store lots of plain text in a MySQL db.
I'm trying to store the bodies of certain html pages in it.
asmuch as a 1000 lines of code.

View Replies !   View Related
Storing Records
I would like to select some records from a database and write the outcome to a file. I don't know how to go about doing this. If it's possible, I would like to arrange the records in a specific way. The idea is to have a cron script do this for me once I learn how to do it manually.

View Replies !   View Related
Storing SHA($pass)
I'm using SHA($pass) to store passwords in mysql. My question is what should the pass colum be, is the SHA always a certain length etc. What is the column type with the least memory usage/problems etc

View Replies !   View Related
Storing The Value 'N/A' As FLOAT
I am planning on storing a CSV file in a mySQL db. So far so good.
the thing is: I have few numeric columns with floating values (value example 52.45 or 13.25).
The problem is: these numeric columns also contain 'N/A' values when data is, well... not available.How should I store this data? I made a small test that resulted in a '0' when I tried to insert a string into a FLOAT field. Makes sense...How would your people deal with that issue?If I store the numerical data as VARCHAR - can I run mathematical calculations with it?

View Replies !   View Related
Storing "
if I can do row lookups in constant time if I know what row I'm looking for, i.e. I know the row key(id). I know I can use an index to speed up queries but for what I understand it still does a b-tree search when using an index. Basically, I would like to store a "pointer" to the row and use it later to get the row without any searching overhead, is that possible and how?

View Replies !   View Related
Storing Avg Value Of 3 Columns In 4th
I want to create a table which stores the average value of 3 columns and store that value in the 4th column.

create table Score(num1 int unsigned,num2 int unsigned,num3 int unsigned, avgnum ((num1+num2+num3)/3) int unsigned);.

View Replies !   View Related
Storing A Time (not Hr:min:sec)
I am trying to store a time in the form of min:sec.100th sec . This is the output from a piece of software that time various races. The only way I can get the MySQL db to keep all the data is to insert it as a text field. Putting it in as anything else will truncate to fit the data type. I.E. int become 1 from 1:03.45.

I can store it as text, however times that don't fill into the minute, (meaning less than a minute) don't sort properly. Well, they do, but not how I want them. MySQL parses 59.45 as being higher than 1:03.23, which it should, but that doesn't work for me. If I add a 0: in front of the 59.45 (0:59.45) it will work correctly, but that isn't the form the times will be given to me.

Short of modifying all the times that are less than a minute to reflect the 0:, or changing all the times over a minute to their equivalent in seconds and then working in INT's, is there any easy way to get around this?

View Replies !   View Related
Storing Password
I created a form where user enters his/her username and password. I need to know how can i make mysql to store and view password field in an encrypted format not display it as regular text.

View Replies !   View Related
Storing BLOB
Im using MySQL 4.1. How do you store an image (BLOB) into the database (without the aid of other programming softwares)?

View Replies !   View Related
Storing Checkbox Value
How do I store the result of a checkbox (T/F) in the database? What type is best? I've tried enum & tinyint, but the error was 'Column count doesn't match value count at row 1'.

View Replies !   View Related
Storing An Array
Any tips on the best way to store an array in my database. If it helps to know, its a ruby array/hash

View Replies !   View Related
Storing And Using Images
I am planning an extension to my website that will be based on a template.
For the sake of argument let's suppose that the page caters for 5,000 clubs. While the general layout and options can all be based on the template, I want to put each clubs logo on their own page. I realise that there are two methods, either store images in a database or in a file and call them from a link in a database. Assuming I am uploading all the images, which would be the simplest solution. I use dreamweaver 8, mysql and php.
I can see that if they were in a database, putting them onto the page would be easy but uploading them would be difficult.
If I used a file based system, uploading would be easy but I don't know how to get them onto the page.

View Replies !   View Related
Storing Day Of Week
I need to store the day of the week an item will occur on every week. I will then be able to sort by that column by the day. I was thinking about storing it in a datetime field while putting all items in the same week but changing the date so that it coincides with the proper day of the week. I'm not sure how to do this in either the mysql query or in php.

View Replies !   View Related
Storing Numbers
How do I store a number in this format... 2.00


View Replies !   View Related
Storing User CSS
I'm working on a social networking site with a friend and am curious about something: how much bandwidth do mysql queries typically consume? I'd like to make the CSS of user profiles open for editting, but that would mean a lot of css settings would have to be stored and constantly queried. Does this take up a lot of bandwidth and are there any ways to open up the CSS without consuming too much?

View Replies !   View Related
Storing Arrays
What is the best datatype/method of storing an array of data retrieved from PHP. And/or do I need to convert the array to a string before inserting?

View Replies !   View Related
Storing Images In The DB
I have a database that is a catalog of movies, books, etc and I would like to have a page that actually shows an image of the item along with the title, that's not the problem, the problem is I do not know how to go about storing images in the database and assigning them to catalog entries.

View Replies !   View Related
Storing Quotes
Whenever someone submits a review on my site that has (decorative?) double quotes, like “ and ” (not ") it saves in the database as something “ and ” respectively.

Also, I am sure, other (decorative) characters will cause problems, but these are the main ones I notice.

How do I get around this? I would like to be able to store “ and ”, etc.

View Replies !   View Related
Storing Arrays?
I know in PostGreSQL you can store data as an array and the database can format it for you when you output it... however is this possible with MySQL? How would I do this in MySQL? Maybe an array like:

array('1'=>'Hi','2'=>'How are you?')

View Replies !   View Related
Storing Partial Dates
I am creating my first mySQL database to store genealogy information and
would like fields for date of birth and date of death.Unfortunately some older records are quite vague with only the year being
available in some cases. I am concerned that if I store only the year or
month & year where available then when the information is retrieved then
the missing information will be defaults which are incorrect.
For example if I store the date of birth as "March 1900" how can I avoid
this being retrieved as "1st March 1900"
Would it be best practice to store the day month & year in separate fields ?

View Replies !   View Related
Storing Images In MySql
Is there a way to store images in a mySQL database? I was hoping to store them in a table, then use php to call them from the database and display the picture on a webpage.

View Replies !   View Related
Storing Single Bits
My latest web project includes loads of user-customisable features,
lots of which are on/off values. Currently I'm storing each one of the
15 or so properties in tinyint fields, as 1s or 0s. There must be a
smarter way...

I know it's possible to store a set of 8 bits in a tinyint column, but
the work involved in retrieving, and (more importantly) updating the
flags is off-putting. I had a look at the set field type, but can't
find any mysql functions for updating sets - I want to be able to
change specific bits in a set without having to retrieve the set
first.

View Replies !   View Related
Storing A Barcode In MySql
Im designing a program, and it has to keep track of articles in a
wharehouse.

The client uses a barcodes in the articles. Im wondering how to store
this barcodes and how to work with them. The database engine is MySql.

Anybody has ideas?

View Replies !   View Related
Storing Images In SQL Database?
I am about to start on a project where I will need to store a large
amount of images and details about images. SQL seemed a natural
choice for this, but I was a little unsure about how to store the
image itself.

From reading around I have found that there are two techniques that
people normally chose for this sort of work:

1) To store everything about the image within the SQL database, and
the image itself on a file system. A link to the image in the file
system is also stored within the SQL database.

2) To store the everything, including the image within the database.

I was wondering what people thought about these two techniques, and
which they would use. Ideally I would like to store everything within
the database as this seems a tidy solution, but I have read that this
may not be the best way to go.

View Replies !   View Related

Copyright 2005-08 www.BigResource.com, All rights reserved