Database Exporting
Quite by accident, I found the mysqldump utility, that comes with MySQL,
which dumps/backsup a database, table, or record. It looks very versatile!
Does PHP have a way to export records of a MySQL database? Anything that
does the same independent of the database used?
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Exporting A Database
developed a php project using mysql as the database.i work on a win-nt machine....how do i export my database to the host server which runs linux???
Database Exporting
As part of the CMS that I've written, I would like to give users the ability to backup their own databases. Is there any way that this can be done with PHP? What I'd like is for them to click a link and for it to create a txt file and open the "Save as" dialog box so that they can save it off to their hard drive.
Exporting MySQL Database To File Using PHP
I want to export my database to a file that is hosted on the same server. I got this script from somewhere, but it doesnt work. Most likely because I cannot access mysql command thru the shell_exec() command, however, I am able to use the wget command thru the shell... Here's the code I was trying to use:
Exporting Database To Excel (via Website, NOT PhpMyAdmin)?
I know via phpMyAdmin I can export my database in Microsoft Excel 2000 format, and can check a box to 'Create field names as first row', but it doesn't give me the php code used to achieve this. I need to have a page on a website so the administrators will be able to do this for themselves, does anyone know if this is possible?
CSV Exporting
I created the csv file, but it only shows the last record in my db. How can I make it show all of the records? Here's the code:
Exporting To An XML File
I grabbed a web page and had it extract only the links between certain line numbers. Now I want to take that output and export it to an XML file in a format of my choosing. For example: <a href="mysite.com">This is my site</a> Would export to: <link>mysite.com</link> <description> This is my site </description> I will then take that XML file and output it as HTML, however I already have this bit accomplished.
PHP Exporting To Quickbooks
I am working on a web-based payroll application (PHP/MySQL of course) that needs to be able to dump each employee's information in to a Quickbooks formatted file for payroll processing. I have done this several times exporting to a tab/comma deliminated text file (usually MS Excel), but I was wondering if anyone could see any reason why it could not be done the same way (assuming that Quickbooks uses a a tab/comma file structure) for Quickbooks??? If it can be done would I use the same mechanics as I would for Excel (changing the file type meta tag)?
Exporting Csv File
I'm having issues getting all the information from 3-4 databases into one csv file.. What easy thing am I missing this time? header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=export.csv"); header("Pragma: no-cache"); header("Expires: 0"); $select = "SELECT * FROM ordersCopy O, orders_products P, orders_total Q WHERE O.orders_id=P.orders_id OR O.orders_id=Q.orders_id AND orders_status=Ɖ'"; $export = mysql_query($select); $count = mysql_num_fields($export); for ($i = 0; $i < $count; $i++) { $header .= mysql_field_name($export, $i)." "; } while($row = mysql_fetch_row($export)) { $line = '' foreach($row as $value) { if ((!isset($value)) OR ($value == "")) { $value = " "; } else { $value = str_replace('"', '""', $value); $value = '"' . $value . '"' . " "; } $line .= $value; } $data .= trim($line)." "; } $data = str_replace(" ", "", $data); if ($data == "") { $data = " (0) Records Found! "; } print "$header $data";
Exporting Mysql
there is a function in phpmyadmin that exports all the data etc from a mysql database to an sql text document, or Excel File. I would like to know if there is an inherent way of doing this without phpmyadmin. - straight through php.
Exporting From MySQL To .csv Using PHP
I'm sort of new to PHP. I am using the following code to retrieve a column from a database and to put all of the results into a .csv file. This allows creates a .csv file, but only lists the first result from the database. It is not returning all of the rows. I know the issue is somewhere in my "foreach" but I'm not sure where. <?php $selectSql = "SELECT artist_name FROM lounge_products"; $selects = $db->getAll($selectSql); foreach($selects as $select) { $content = $select[artist_name].","; } Header("Content-Disposition: attachment; filename=export.csv"); print $content; ?>
Exporting To Excel
I followed the really cool how to at http://www.phpfreaks.com/tutorials/114/0.php but I had to change some things to get it to stop giving me errors. After I did that It seemed to work great but it put everything into one cell in the excel document. Code:
Exporting MySQL Table
Hi, How do you export a MySQL table to a tab-delimited text file so I can put it into excel?
Exporting To Microsoft Access
I have a PHP website with a mySQL database and a client wants to be able to see the database on his computer using Microsoft Access. I would like to be able to make a special backdoor section for him, where he enters his username and password and is given a link which will make take a snapshot of the mySQL database and convert it to a Microsoft Access database which he can download to his computer. Is this possible? Since he isn't very computer savvy I need a way as user friendly as possible to let him download the database and view on his local computer.
Exporting Mysql To Csv Or Excel Via PHP
Hi, I need to know how to write a php code how to export the mysql database into CSV or Excel or ISO 20001 format. or if you know any tutorial site for it.
Exporting Data To MS Excel
How to export data to xls file using PHP? Is it possible to edit a look of document (like cell size, borders etc.) ?
Exporting From Db To Text File
I have the following sql statement that works from phpmyadmin and from the MySQL command line, but not php. The resultant $sql variable is the following: $sql=select logrecno, county, sumlev into outfile "/tmp/census.txt" fields terminated by ',' lines terminated by "" from sf1_msageo where sf1_msageo.county=97 and sf1_msageo.sumlev=140 $result=mysql_query($sql); The query executes, returns no messages, and does not create a file. Any idea as to what I'm doing wrong?
File Exporting To Excel
This code exports data from my DB into an Excel file by using " " as the delimiter. It runs through the script over and over until it's done creating an Excel file with columns of data, but is there a way that I can add a value to the beginning of the script - thereby naming the columns? Code:
New Exporting / Getting News From Different Server
Which is the best way to fetch news from my server and display it on other sites. I have an admincp i would like to display announcements in from my site. Maybe just some how remotly including a file from my server or something.
Exporting Search Results To A CSV File
I am about to start programming up a database, where the client requies the data exported to a CSV file for use in mail merge documents etc. What I would like to know is, if they run a query on the database, and only export five of the 10 fields in the table to the list, how would I go about reatining the field names on the first line of the CSV file?
Exporting Mysql Data To CSV In Php Code!!
how can i export the results of a query to a csv file with the columns name in the filed name of the csv???suppose USERID is the 1st column the USERID should be named in A in CSV while its data is under of it??is it possible?
Exporting Information From Entourage To A Website.
I have this new website for a client, it has a calender which shows events from a mysql database but they don't want to have to update the information to it manually. What they are using is a program called Microsoft Entourage. What are the possible ways for me to be able to get that information every 1 hour and get it into a database?
BBCode Parsers And Exporting Text From A DB
I'm currently working on a simple (at least I had hoped) script to pull posts from a single "news" forum from phpbb and importing it on the front page of my site. It works great except for the BBCode issues. It doesn't keep line breaks (biggest concern) as well as text colors, urls, etc (which was expected). Talking with a friend, he tells me that I'm going to have to insert some BBCode parser to make things work right. I have 3 questions regarding this: 1) is that my only answer? 2) should I try to use the phpbb BBCode parser that the forum uses? 3) should I install a custom BBCode parser instead? I did not want to use a portal because they were just over bloated for what I needed and that was simply the posts from the forum itself w/o all the extras like who's online, last post made on the forums, etc. Would it just be easier to try to strip down something like EZportal to just the info I need instead of trying to use this custom script?
Problems While Exporting Data Using Pipe Symbols
I am facing problems while trying to export data into pipe format. In fact I am fetching records from mysql database and then trying to create a text file ( using pipe as delimeter) , intending to open in Excel. The data is been inserted from textarea fields, where the user can write text and may press enter key to format his text accordingly. Now when the data entered into the database it keeps some unidentified value so as to keep the formatting. Hence while displaying the text file I find that lines are seperated according to the format user gave. Thus creating the problem while opening up in the excel file. example:
Exporting Data From Mysql Using Php In Excel Form..?
I have a table in mysql wich contain a sim_number field which is 19 digit unsigned number. i have designed a script using php headear command for exporting data as excel. It is working but with the follwoing problem. Since sim_number is 19 digit number when it get exported as .xls file. now when that .xls file is opened, excel automatically detect this sim_number as number and , since excel can store only 15 digit in number format it converts its last 4 digits to zeros. Is there any way to get this sim_number exported as text so that excel store complete 19 digit number in text format. I cannot attach some charctor to this sim_number because of restricion on file format.
Exporting DB Results (or Flat File) To An Excel File
I have two scripts, neither of which have been written, that will need to collect user information. They will either write to a flat file or to a MySQL DB, and I need a way for an administrator to grab an Excel file based on this data. First, no more than 100 people are expected to sign up, so flat file is certainly viable. Do you recommend I use DB or flat file? Second, based on your recommendation, how should I go about exporting the user data to an Excel file? There will be about ten form fields per registration to give you an idea.
Images In Database Vs. Image References In Database
i kept all of the uploaded images as files on the server, and created links to them in the database. I have been changing things around now (especially directories) and I am thinking of storing the images in the actual database. I read somewhere that this can be considered a bad practice, so i was wondering what the consensus here was. In my opinion, modifying all of the code to point to the correct directories everytime a page location changes seems like a pain in the a**.
Database Search -text Database...
Can anybody tell me how to search a flat file database delimited by |. I have exploded the data and managed to get it into a table but want to restrict the final table contents by a search. The table code at the moment is below - I'd be using a htm file to submit the data. and hopefully be able to search by partial searches eg big would return big and bigfoot. Code:
Why Are There Before Each ' In The Database?
When I enter data into the database via the webform, if I put a ' then the computer adds a so tim's becomes tim's. Now I have had this problem before - I thought you used htmlentities to get rid of it but that doesn't seem to work any more. The insert code is simply:
Php Database
I am new to php database, how to connect php database fields with user profile files page? like if i am creating a user sign up page, and i want it to be stored on the database how do they communicate?
Php/database
i basically want to create two little programs. one that allows a customer to search various part numbers, and two that allows a customer to answer several questions on several different pages and returns a set result. the whole php/mysql database thing seems confusing even with the tutorials i've got. my server is linux and everything is installed correctly but creating an actual database is the problem. it seems like you have to manually issue the commands to input each record.
One Database Or Many ?
If you're writing many databases that aren't necessarily associated with each other (ie parts, vacation days, how you like your steak done, and school you attended, etc; as examples), does it make more sense to have one database name and several tables for the data topics above OR multiple databases since they aren't associated with each other? It would SEEM easier to have a single database with multiple tables from a data management perspective as long as there's no risk of data integrity issues as a result of having multiple tables under one database header
Database-less CMS In PHP?
Besides Pivot (I'd rather wait for the final release), EasyCMS (the navigation bar is static), and CMSimple (all documents saved in a single HTML, so not good for lengthy articles)... do you know of other basic CMS written in PHP that do not require any database (ie. saves contents as flat files)?
Which Database?
Which database would be the best to use with PHP. I'm looking for good performance and low costst.
Which Database?
I'm starting a website to search my country phone list. This website should have about 100.000 or more records. what database shoud i use. which is more reliable. The site will be in PHP and will be on a Linux server.
Database
I have a database (.mdb) made through Visual Basic. I want to have the information in that database availible for PHP on my site. Any ideas on how I could get this to work? Ive heard that there is no way to get a VB database into like MySQL so does anybody else know another way?
XML And A Database
I'm confused how XML is used to benefit interaction with a database such as Oracle, MySQL or SQL Server. Are there any online resources that discuss how XML can be used with PHP to aid in database interaction? To me, it just seems that XML is its owned database structure.
Why Use OOP When You Have A Database?
I'm aware of the functionality of OOP. I use it quite frequently in Java (though, admittedly, I'm still not entirely accustomed to it). I think it's great for quite a few things... Thing is, that's when I don't have a database to work with. The things I have used OOP for, where I acknowledge it has been of great value to me, is when I "simulate" a database. As in linked lists (very simple database, but you get my point). Now, when I use PHP I pretty much always have a MySQL server handy. As I see it, a MySQL table acts pretty much the same as a class would, with each row being an instance of the class, except it doesn't have methods (or functions, or whatever you prefer to call them), which are easily made for common use in PHP outside of OOP anyway. All OOP tutorials I have read have described interesting features to me, like a guestbook, which could very well be done with OOP... but could also just as well have been done with a database - and with less work. So, my question is this: When I have a database readily available, what advantages do I have from using OOP? If you could give an example, that'd be much appreciated (I don't mean a fully coded example... just a brief explanation of why OOP would benefit in such a system).
Database
I have been working on this problem for a few days. When I write data into a sql database, the results are duplicate listings: PHP Code: <?php session_start(); $dbh=mysql_connect ("localhost", "username", "password") or die ('Cannot connect to the database: ' . mysql_error()); mysql_select_db ("database name") or die ("Cannot locate database: ".mysql_error()); mysql_query("INSERT INTO tablename (website) Values('website_es')"); echo "Data Transfer Complete"; ?> After emptying the table and running the PHP script: The results in the database: id website 130 website_es 131 website_es As you can see, I have been working on this for some time, id=131.
PHP Tag In Database
I have a database that consists of text. This text contains php code that needs to be processed before echoing it on the browser. A pseudocode may be: <?php /* connect to database */ /* for each record process the php text in database */ ?> Simply echoing the text will not make the php tags to be processed. Please let me know if you have any ideas or opinions on how to make the text information in database to be processed.
Txt Database.
I am trying to figure out how to make a script that reads from a .txt file and displays data from it, liek a database. the values is stored liek this: 440408,TH0rn,258,1,68,2853 250983,m0f0kiss,0,1,80,1072 270181,PsykoNinja,8,1,67,3103 539930,iajamo,127,1,73,2216 332802,luk3y,14,1,67,3104 Code:
Database
I have been trying to make a database that you can add mpeg files to. I have tried several ways but I have not had any luck. Does any one have any suggestions. How I can go about making one. I was told that best way of doing it is to link the files to a database but, I am not sure how that is done.
Database
What i want to use this for is a user has a favorites column in the database. and when they click add user to favorites... it adds a name to the list in the database. or like an ID number. just so we can keep track of what users like what other users have. then after that is in the database. i would like to be able to refer to that list in a php document that lists all the users in the list. it sounds like a difficult process. but i just need a basic template as to how this works. i have no code written yet. or a datatable set up.
Searching A Database
I have a user who will input a word into a search form. I want to use this word to search the database: any ideas how I can write the mysql code for this. I'm thinking $query = "SELECT * FROM table WHERE col1 like '$search or col2 like '$search etc... anyway I can write this code without doing the above, so that it runs faster--something that will search all the columns with me have to do all the where clauses.
What To Do If There Are No Records In The Database
I am pulling data from the database and displaying it using the code below: $db = mysql_connect("localhost", "root"); mysql_select_db("pyramid",$db); $result = mysql_query("SELECT * FROM table where area='Wales'",$db); while ($myrow = mysql_fetch_row($result)) { echo "blah blah"; } ?> What do I do if there are no records? At the moment it just doesn't display anything. How do I get it to display a message saying there are no records?
Help!!! Oracle Database
i'm very new in using php with oracle database. Right now, I'm using the php with oracle database to do my assignment. After i install oracle into my local PC, may i know what type of changes in oracle database that i need to do in in order to make my php script runable with oracle database? Also, i always see that many people using username and password when logon to the database (eg $connection=OCILogon("username", "password"). may i know where i can refer to this identifier? thanks for your help.
Html In Database
I am storing some html in a database field, here is what it looks like:
Whitespace From A Database
I have a chunk of text that is extracted from a mySQL database. I want to display this text on the page 'as is' with all the line breaks and paragraphs intact. It is not possible to change the way the text is inserted into the database by adding HTML upon submission. Also using <pre></pre> doesn't really work because it just messes up the page completely. The question is, is there a chunk of code I can insert to process and replace the white text with the necessary HTML to display correctly on the output page.
Database Paging
I am querying a mySQL database and returning 2 queries at a time. I have my next and previous buttons working perfectly. However, I am trying to add another piece of functionality. I am trying to create a pulldown list so the user can jump to different pages of the query instead of having to hit previous, next, or the page number. I am trying to pass a page variable through my querystring using a javascript onChange function. If I print the variable on the page outside of the function, it prints correctly. However, the when placed in the onChange function, I get an incorrect value for my page variable. I really do not understand what is going on. I hope that someone can shed some light on this problem. Code: <? if ($offset == 0) {$marker = 1;} else {$marker = ($offset/2) + 1;} ?> <form> <SELECT NAME="PageJump" onChange="top.location.href='sample.phtml?page=<? print($marker); ?>&offset='+ this.options[selectedIndex].value"> <? for ($i=1;$i<=$pages;$i++){ $newoffset=$limit*($i-1); print("<OPTION VALUE=" . $newoffset . " >page " . $i . "</OPTION>"); } ?> </SELECT></form> <? print($marker); ?> The $marker variable at the bottom is correct, but the $marker variable in the onChage function is not.
|