Save Picture Files (.jpg) In Database Records Or Save Only Links To (.jpg)
I dont know what is more eficient. What do you think is better, put in pictures physically in records in database or put in links to pictures in records?
View Complete Forum Thread with Replies
Related Forum Messages:
Pull Info From One Database To Save In A Session To Push To A Different DB
I'm building a dynamic site that has 3 data bases. One DB contains all of my store info ID#, Name, Address, Phone. Another DB contains member info ID, Name, address, email,phone,etc... The 3rd DB Tracks when a user logs in and logs out at a store. This DB has the following columns Store ID, Member ID, log in time,log out time, time in store. The stores log in in the morning that starts a session-I need the session to pull the store's info ID#, Name,etc... so when a user logs in, in the store. The login page inserts the store ID, Store name, and user ID into the 3rd DB. There are a lot of stores how do I get the store variables to be inserted into the DB?
View Replies !
Save Changes
I'm working on a membership database (MySQL 4.1) with about 350 members. The client wants every change made to be recorded so that there is a record of what was changed. So they want what row was changed, what was changed within that row, when it was changed, and who made the changes. Is there a way to so this automatically in MySQL or do I need to set up a new table and alter all existing queries?
View Replies !
Insert_id Save
The problem: I fill one table with something, then grab the insert_id from it. Then i add that insert_id to another table to link the two together. This is for making an account. The problem: what if multiple users make an account at the same time and the queries get mixed up? E.g. these are run before insert_id has a change to kick in insert into table1 by user1 insert into table1 by user2 insert_id then gives me the insert_id from user2 while i was expecting the one from user1 Will this be a problem and if so how is it best solved?
View Replies !
How To Save Commands?
I want to know how to save previous commands. I am using mysql 5.0 in a Windows operating system. i want to know is there a method of saving commands (statements) when I use the command prompt (shell) to execute command to mysql server.
View Replies !
Storage Save
I had two table very large data, i just now did "truncate table cdr", all data erased but still my space is not free. because following file is still same size, how can i reduce this size? I also cant ftp this file the server goes down with blue screen. Mysql Server 5.0: ===================== C: Free 1.5gb C:Program FilesMySQLMySQL Server 5.0dataibdata1 10.8 GB (11,670,650,880 bytes)
View Replies !
Save Without Exit
What command shall I type to save the entry but without exit, e.g. on mysql> After finishing typing to create a table I expect to save it first before creating another table. However I don't expect to exit and retype; # mysql -p mailserver
View Replies !
Save Query Results
In other words, how do I build a new table from the results of a query, so I can access pieces of this data later without performing the same query (a very heavy one) over and over again?
View Replies !
Cannot Save Zero To BOOLEAN Field
A PHP script generates the following statement: update cms_content set content_name = 'Blackmask', sub_cat_ID = 63, UDF1_1 = 'Blackmask', UDF1_2 = '', UDF1_3 = '', UDF1_4 = '', UDF1_5 = '', UDF2_1 = 'http://www.blackmask.com', UDF2_2 = '', UDF2_3 = '', UDF2_4 = '', UDF2_5 = '', Comment = ' ', Author = 'Phil White', Edit_date = '20080106', reject_reason = 5, reject_text = 'The content of your submission does not fit the category for which it was submitted.', Released = 0, Sticky = 0, rejected = 0, UDC1 ='Around 20,000 books for reading online.', UDC1_bitfield ='', UDC1_uid ='', UDC2 ='', UDC2_bitfield ='', UDC2_uid ='', UDC3 ='', UDC3_bitfield ='', UDC3_uid ='', UDC4 ='', UDC4_bitfield ='', UDC4_uid ='', UDC5 ='', UDC5_bitfield ='', UDC5_uid ='' where content_id = 2974 In the application, it is rejected with You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' reject_text = '', Released = 0, Sticky = 0, rejected = 0 , UDC1 ='Around 20,000' at line 1 The problem is with "rejected = 0". If I set "rejected = 1", the statement works fine. The CREATE is `rejected` tinyint(1) default NULL, Now here is the strange part. Using the MySQL query browser, the statement is accepted without problems with a value of 0 or 1. (I copied it through the clipboard from an echo.) The columns "Released" and "Sticky" were created in the same way and accept either value without problem. I am at my wits' end.
View Replies !
Save Current User In DB
I want to create a field that will save the current user of the DB, I tried with Field Name : Usuario Field Type : char(30) Default: CURRENT_USER or Default: USER etc but doesnt work How can I define the field?
View Replies !
Save Queries In Back End
Is it possible in MySQL to create and save queries in the back end DB. I am used to MS Access, in which you can put together a complex query and save it in the DB Backend. Then use the query in a ASP page instead of long SQL.
View Replies !
Mysql Save To A Temp File
In the later part of June a new Linux Mysql server was installed. While mysqld was still running,the data folder was moved to a different volume and a soft link to the new location was put in it's place.I know, bad idea,but everything seemed to work fine, so I didn't think anything of it.Today, the server had to be rebooted for the first time since, and now all data since the folder move is gone. It's as if mysqld was just using ram to cache everything, and not writing out changes to disk.Is this true, that all data was only written to memory and not disk, or is it possible that the data was written out to a temporary location somewhere that I might be able to recover some of this data from?
View Replies !
Save Both Japanese And English Characters
I will try to explain you what is my trouble: I am not be able to write in my database using asian characters: 1) メッセージ 2) 제외하고 3) анить пароль 4) etc.. .. .. I have a trouble using in my database asian characters. When I copy and past them on my forum, I see that: 1) 分対 2) じませ 3) にフォー I think that I have to set up my mysql in a different way. I would like to know that: How I have to do for saving both european characters and asian characters? What version of mysql I have to use? What are the character_set and the collation that I have to use ?
View Replies !
Save HTML Page In MySQl
What is the best way to save a HTML page in MySQL? I just need the text not the images. I intend to save several 1,000 pages. Should I create a field or referance the pages which would be saved as html files to a directory. I'm not sure what the pros/cons of each method or if there are any other ways to do this.
View Replies !
Save Game Score History
I want to save game scores in my DB. Ive learned that two tables is suitable for this. One that takes care of the parameters for the games it selves where each row I contains a game, and one for the game scores where each row contains a player and only the bests scores for each player are saved. Now I want to save all the scores each players submits. How do I accomplish this?
View Replies !
Fail Save System Task
i have a task which can take up some amount of times, which is upload a .csv file, and import those content into database. I would like to know whether a fail save design can be perform there. Requirement 1. the script will resume (or start all over again) no matter which service down(apache/mysql) 2. Script auto resume witout human interaction after server restart complete 3. Data record content (from .csv) inserted into those several table tally(using transaction) 4. Mail notification (i really have no idea if the mail server down too :( ) Can someone give me some idea how to come out this kinda things?
View Replies !
Save A List Of Unknown Length
I'm trying to create a db that I can store recipes in.I would like to have a table for the recipes and a seperate table for the ingredients,but each recipe will have an unknown number of ingredients.i don't really want to create max-ingredients +1 fields and I would prefer not to save a string of PKs that i have to parse appart.This has got to be a common task, how is it done?
View Replies !
'Save' Menu Option Inactive
This had me losing lots of work and wondering what's up with the File->Save menu option. I have been creating sql files and (thinking I was) saving regularly with Alt+F, then S... To my dismay, when I reopened the files they only contained code from the first time I saved (save as). Then I noticed that the Save menu option is always greyed out. Is this how it was intended to be or is there a problem with my install? Any help on this would be appreciated as I instinctively use Alt+F and S, rather than Alt+F, then A (or Ctrl+S) then selecting the correct filename and then clicking 'ok'.
View Replies !
Save Error Output In File
need the erroroutput from mysql in a textfile. I try it with follow comand: "mysql -uroot -ppassword -hhostname --force database < input.sql > output.txt" But the output.txt dont contains the erroroutput. The Erroroutput is only show in the console.
View Replies !
How To Save Chinese Record In MySQL?
I am now using MySQL database to save Chinese, my OS if Chinese Windows2000, and my MYSQL version is 4.2, but I couldn't save some Chinese characters at all, some can be saved, others are lost or displayed in a mass, you won't understand the meaning at all. Can anyone tell me how to solve this problem, how to save Chinese informaiton in MySQL?
View Replies !
How I Can Save Both Japanese And English Characters, In My Text Box?
I will try to explain you what is my trouble: I am not be able to write in my database using asian characters: 1) メッセージ 2) 제외하고 3) анить пароль 4) etc.. .. .. I have a trouble using in my database asian characters. When I copy and past them on my forum, I see that: 1) 分対 2) じませ 3) にフォー I think that I have to set up my mysql in a different way. I would like to know that: How I have to do for saving both european characters and asian characters? What version of mysql I have to use? What are the character_set and the collation that I have to use ?
View Replies !
Save Command Output In Text File
How can i save output of "Select" command to a text file on server ? Example : SELECT email FROM `forums` into outfile "/text.txt"; ^^ This does not works and gives this error on mysql prompt : ERROR 1045 (28000): Access denied for user 'database_data'@'localhost' (using password: YES) But if i just run this command on mysql prompt : It works ... SELECT email FROM `forums`; It runs fine and displays result on screen. But i want to save the output of the command in a text file on the server... Kindly let me know, right syntax to achieve it.
View Replies !
Write/Move/Save Pdf To MySQL Table?
Is upload the only way to pass a file to a table? I have a contract.pdf which is generated via php (FPDF) and saved in a temporary file. I need that file then moved /written to the appropriate customer table in our database (MySQL ) so that the temporary file may then be overwritten by the next Customer/Order. While I am able to upload the file via <input type="file" name="uploadpdf> and related uploader.php, asking our web-users to browse for the file does not suit our needs, and of course adding a default value <input type="file" name="uploadpdf" value="http://localhost/crm/modules/Orders/contract.pdf"> doesnt work either. As the file is always the same (modules/Orders/contract.pdf) how may I manage that move automatically, (say with a Confirm Order button) to the database?
View Replies !
MySQL Administrator -- Save Custom Graph
So im using the MySQL Administrator GUI (downloaded from mysql.com) and I LOVE IT! But, there is a slight issue. I want to save the graphs I create so that when I restart the machine the same graphs can be accessble. How can I save my graph formulas? If there something like .mysql-admin under the ~/ path or something like that?
View Replies !
How To Save Accounts Based On Variable Amounts Of Time
I'm currently building a website where users can signup for various accounts. An account may last 30 days, 12 months or 24 months. If a user's account is about to expire, an email notification is send, via a CRON Job. I want to save the different account types in the database, but I'm not sure how to save the duration of an account. If it was all months, I could simply save ཈' or པ' as an INT, but it also has an account for 30 days, which is more flexible. Edit: It would also be nice if I could ORDER BY duration..
View Replies !
How To Save The Content Of A BLOB Field To A File Using Windows Shell
I don't know if someone can help me with this since I am not sure if the problem is more on MySQL side or more on Windows shell's side (cmd.exe on Windows XP). The DB server is on my own computer. For migration purposes I need to store the content of each row of one of my tables into a separate file on my disk. There are various types of content (jpg images, Word and PDF documents, and so on) in this same table. When performing a SELECT BINARY mycontentfieldname FROM mytable in MySQL Query Browser I get the binary content and it even displays the image all right when the field contains an image data. So I know the data can be retrieved. But I need to automatize that with a little script running from the OS shell. So I have tried variations of the following command under the Windows CLI: C:> mysql -uuser -ppassword -Ddatabase --skip_column_names -e"SELECT BINARY mycontentfieldname FROM mycontenttable WHERE id = '7861'" > "C:data7861" In this example I am trying to extract the file of id 7861, which is an image. The script will take in charge all the files, giving its id to each file's name. The problem I encounter is that when I open the "C:data7861" file now stored on my disk with a hex editor, I realize that the data is not copied exactly bit per bit. Some bytes have been replaced, and in particular the '00' pattern (I check that with the field viewer in MySQL Query Browser) is being replaced with '5c 30', causing my file to be unopenable. Here maybe MySQL thinks some special characters have to be replaced before being given to the output. I have tried using the -r (or --raw) option in the command line, but the result is a truncated file. Actually in this example I get a 10 bytes file when the original file is 100 kbytes. I fear that Windows then interprets the '00' as an EOF. My question is: is there a way to get my file using the shell? More precisely, is there a way to deal with Windows and MySQL to get an exact bit per bit copy of the output (maybe using another operator than >)?
View Replies !
Storing Pointers/Links To Files
I have a form that allows users to enter to input data via a text box. It also has the ability to take any of the word(s) entered and create a hyperlink to a file if needed. Everything works great except when this data is written to the database the backslash for the subdirectorys get messed up. For example, if the directory a file is located in is: c:mydirectorymyfile But when written to the database it comes out like this: c:mydirectory|myfile How can I get the to insert instead of the | for the pointer?
View Replies !
Any TABLE TYPE Be Able To Save And Retrieve "Diagram"?
I'm seeking a solution that is able to: 1. Draw a diagram (such as an organization chart or cause-and-effect diagram) and fill nodes with related data. 2. Then, save the data and diagram into MySQL. 3. Finally, retrieve both data and diagram from MySQL and display them in corresponding places.
View Replies !
"Unable To Save Result Set" Error
I keep getting the following error. Warning: mysql_query() [function.mysql-query]: Unable to save result set in /home/mysite/public_html/demo.php on line 303 Invalid query That error is this line, which you can see at the bottom of the code below: $result = mysql_query($sql) or die("Invalid query") . mysql_error(); Here is the PHP Code:
View Replies !
How To Save Binary Data Into A Binary Field
I want to save some binary data into MYSQL. dim s as string s=chr(0)&chr(1) chr(3) & chr(6) & chr(7) conn.execute "INSERT INTO test values ('" & s & "')" The field in the table test is binary. The odbc returns an error but using the query browser the query ends good. Any idea?
View Replies !
Links Database Structure
I'm creating a 'Favourite Links' function on our Intranet, using PHP/MySQL. I'd really like some advice on the most efficient way of setting this up. Users login to the site and are either identified by a cookie or by a session. Their favourite links (ID, Title, URL, Description) will be displayed on their personalised homepage. We have about 230 users. I could set up a a table to hold the links for each user but that seems excessive. I could create the one table of links but with a field that records the owner/users ID but perhaps that would be a very memory-hungry query once the table gets really large.
View Replies !
Store Links Inside The Main Text In A Database
we are trying to set up a mySql database while rebuilding a webpage with lots of content.we actually dont know how to set up the tables for that and especially how to store links inside the main text?should we use xml files to store the text with embedded links?
View Replies !
Picture Retrieval
ive created a dynamic table in dreamweaver. The news articles about cars are stored in my DB and come up. I have an image on the side of this news article and the name of this image is stored on a field in my pictures table! basically, the picture comes up beside my news article. im using this code SELECT * FROM car LEFT JOIN pictures USING (car_name) HOWEVER, it only comes up for one news article, it does not come up for the rest! Car table: car_name colour model PIctures table: small_image large_image
View Replies !
Picture And Visual Confirmation
can you just give me some idea on where to look in the manual somewhere regarding the following issues. 1. How can i do for example display a specific picture when a user request something in the database ? how do pictures get stored in mysql anyway ? ... i know it might be a silly question. 2. Is there any way for example to store a set of pictures in a folder and using a random function to display it in an input form to make users enter whatever they read on the picture so that i can use that as a simple way to discourage people from running scripts on my form
View Replies !
Displaying Picture From A Mysql Table
I have a database named dmtp with tables cities and markers. I need to display an image stored as mediumblob in markers, in dmtp. now I am using the syntax like this - $result = mysql_query("SELECT cities.cityname, cities.citybuslink,markers.picture, markers.information FROM cities, markers where markerid = 1 AND markers.cityid = cities.cityid "); while($row = mysql_fetch_array($result)) { echo "<tr>"; echo "<td>" .$row['picture']. "</td>"; echo "<td>" . $row['information'] . "</td>"; echo "</tr>"; } However, the part where the picture should be displayed shows all garbage values, any idea on how to display the actual image stored inside the database ??
View Replies !
Where Are The Database Files
I need to upgrade/reinstall the machine that currently hosts my database. I would like to copy the database files that I have so I can restore them once the machine is reloaded. The problem is that i do not know where to find my database files. I am currently running Fedora Core 6 as a LAMP. So can someone point me to the database files?
View Replies !
Database Vs Files
i am creating a new site and i want the banner to be changing dynamically. I was thinking that i can write a script that reads the image files from the folders and picks up one randomly. Another way is to implement that using a conenction to a database. What u think is much faster? Is the multiple connections to the database reason for bottlenecks?
View Replies !
|