Can you help with a website development problem? (php, sql)

1 Answer

Answer :

You could do it either way, whichever is more comfortable for you. I would go the MySQL route because for me it helps keep the code cleaner, and doesn’t require lots of filesystem access by the php script (but takes a bit more planning). As for importing the data into the database, well, there’s a lot of ways to do it. First, I would get a list of all the files (windows dir, unix ls commands would work), and modify into the necessary columns with your favorite editor. At work I have to use Excel and Notepad for this type of stuff, at home, I’d rather use Vi & various GNU Utils (basically opposite ends of the spectrum). Then, you could either write a simple importer in php (make sure only you have access, of course), or, if you have access to a mySQL GUI (I like phpMyAdmin) use that, or use the mysqlimport command to import the file (that will depend on what you have access to on the server). The other option, using php to parse the directories, your best bet would probably to read up on PHP’s filesystem functions: http://us3.php.net/function.file hth

Related questions

Description : What is the best text editor for HTML/XHTML/CSS/PHP/SQL on Ubuntu?

Last Answer : Take a look at Geany

Description : What is the right access 2007 sql syntax for adding the last record of another table?

Last Answer : INSERT INTO samples (id_sample) SELECT Last(project.Id) AS LastOfId FROM project I tested this and it works. One nice thing about Access is you can use the graphical query designer to test your syntax. The ... View if you prefer text over the GUI. It will not run or save your query if errors exist

Description : What's the simplest way to create a web form that will populate a SQL database?

Last Answer : Give Forms To Go a try.

Description : How can I search for a specific column name in MySQL?

Last Answer : SELECT table_name, column_name from information_schema.columns WHERE column_name LIKE 'Name';

Description : PHP help... contact form problem.

Last Answer : You should probably do an ajax form submit and replace the form with the confirmation message. I’ve got to get to bed, but I’ll find a tutorial for you in the morning if someone else hasn’t already. (basically, opposite of this: http://24ways.org/2005/edit-in-place-with-ajax)

Description : Using a PHP page to post "blog" entries on my website.

Last Answer : answer:It shouldn't be too hard- you'll probably want to apply the CSS to the page that is retrieving and displaying the information, not the page you use to enter it. Whatever code is generating your ... CSS classes, id tags, and DIVs to. It's hard to get specific without actually seeing the code.

Description : Could I use ASP,PHP,JSP all in one website?

Last Answer : i use my psp at work all the time.

Description : Which of the following statements is false   You can make a website without using HTML   You can make a website without using PHP   You can make a website without using CSS   You can make a website without using Javascript

Last Answer :  You can make a website without using HTML

Description : PHP problem with && and possibly a malfuntioning array?

Last Answer : answer:Unfortunately the examples above don't really shed a lot of light without some additional information. Maybe we can help with some troubleshooting tips in general? A couple of things that come to mind ... is where you're expecting it. Good luck with it, I hope it all comes together.

Description : What's your favorite PHP integrated development environment (IDE)?

Last Answer : If I did PHP development, I’d probably use Coda: http://www.panic.com/coda/

Description : What program is good for PHP development on Mac?

Last Answer : answer:We use Eclipse (with the PDT plugin) where I work, but I wouldn't necessarily recommend it. The thing it does that I find indispensable is allow you to follow method references into the ... formatter. I find it helpful for quickly looking up the order of parameters and other arcana of PHP.

Description : How to solve this problem I have with a restore (backup) file I made in SQL Server 2008?

Last Answer : try to see if you have volume optimization enabled, it prevents certain changes from happening and really gives the user a hell of alot more trouble than it is worth.

Description : What are the best web sites to get help with Apache, PHP, and MySQL?

Last Answer : stackoverflow is the best site programming q & a site I know of. Looks like there is a fair amount of LAMP-related questions there.

Description : Finding PHP video to help create sign up?

Last Answer : answer:I haven't ever heard of anyone learning PHP with video, but what you'll need is to create another form with the relevant boxes (name/email, password, confirm something for some reason). ... to google something like programming resources or PHP resources and look for what other people did.

Description : [PHP] Forgot Password Help?

Last Answer : You could try using the built in PHP crypt() function, you pass the string and a salt you want to encrypt, then to decrypt it use the decrypt() function and the same salt. That should give you the same password back. Though really you should try to push for a randomly generated password on reset.

Description : I understand what the PL/SQL code below is supposed to do, but when I run the code, it won't compile. Can anybody help with why this is so?

Last Answer : answer:PL\SQL really isn’t my thing, but I believe you need something between the first IF statement and the ELSIF. What do you want it to do with the number if it is 50 or 90?

Description : Does anyone here have experience working with PL/SQL? I need some help getting started...

Last Answer : answer:PL/SQL is Oracle's take on SQL. It's mostly vanilla SQL, but with some Oracle-specific twists. You need Oracle SQL Developer or something similar. I doubt other relational ... more closely resembling a true object-oriented language, so make sure you get something Oracle-specific!.

Description : Help him in writing SQL query for the following purpose: (i) To count how many female candidates will be attending the training. -Technology

Last Answer : (i)Select count(name) from training where name like ‘Ms.%’;(ii) Select * from training where fee is NULL;(iii) Select city, fee from training where topic = ‘Cyber Security’;(iv) Alter table training add feedback varchar(20);

Description : Ms. Pari, a beginner in SQL is not able to understand the meaning of “Cancelling a Transaction”. Help her in understanding the same. -Technology

Last Answer : Cancelling a transaction means rolls the transaction to the beginning. It aborts any changes made during the transaction and the state of database is returned to what it was before the transaction began to execute.Rollback command is used for the same.

Description : What is a PHP error?

Last Answer : It’s to do with encryption. PHP means Pretty High Privacy or something like that. IT means that the data sent was not encrypted. This might happen on a website that starts with https. What were you doing at the time?

Description : Is it possible to store PHP scripts in the cloud?

Last Answer : answer:Yes Simplest example would be to grab the script from a service, stick it in a variable and eval it. Could you provide an example of why you’d want to? I can’t think of a good reason to do it offhand.

Description : What is the difference Java and PHP?

Last Answer : …so what exactly is your question?

Description : Which is better between PHP and ASP.net?

Last Answer : answer:I prefer PHP. It is well documented and very portable. ASP is non starter for me since I refuse to use IIS. I like Ruby and Python too. But when I have to start a project from scratch I use PHP and CodeIgniter.

Description : Does GoDaddy have some PHP functions disabled by default?

Last Answer : Doesn’t look that way, but I can’t really tell. Your host does appear to suck.

Description : What's wrong with this simple PHP script?

Last Answer : answer:Do you need a concatenation operator (.) between your string and the variable name ($the_long_url)? But like this: ’”.$var.”’ http://www.gidforums.com/t-965.html

Description : What's the best way to deploy a PHP application?

Last Answer : answer:debian package At a previous job I had to install/maintain a site written in CakePHP. I made it into a debian package. “aptitude install projectname” and you’re done (although I guess that is technically “touching the server”) Send me a PM and I can give you the details.

Description : As a specialist PHP/MySQL programmer at my (not so fun to work at) job, what's my future?

Last Answer : It depends if you want to continue doing programming or not. If you have good people skills, and good business sense, you could get PMP certified, or learn VersionOne and move to the business ... business side. We also prize business analysts with SQL knowledge in order to manage data and metrics.

Description : What is the most popular PHP framework available?

Last Answer : I’m lazy and will just answer the last question. I use CakePHP when I need too since I’m familiar with it and it gives me the least problems out of the ones I have used. But I avoid them and usually just do everything from scratch.

Description : Php logging in problems? learning php?

Last Answer : answer:It means that it got to the end of the file and was expecting a ”}” and didn’t find one. Quick count of your braces: { = 7 } = 6 Yup, you’ve got a mismatch.

Description : Which windows application for writing PHP codes?

Last Answer : answer:Don’t know about compiling php? and debugging is also foreign to me. But Notepad++ is awesome.

Description : If I already know basic PHP/MySQL, what else should I learn to use Google App Engine?

Last Answer : answer:I am not an expert, I just started reading up on this myself, but here are a couple of starting points on data storage. Rather than a separately maintained SQL database, ... .com/appengine/articles/datastore/overview.html http://code.google.com/appengine/docs/python/datastore/overview.html

Description : Is there software that you can call from, for example a PHP script, to translate languages?

Last Answer : Google AJAX Language API

Description : How to make cookie in php track both in www.site.com and site.com for some web-site?

Last Answer : answer:Set the domain argument to just '.site.com', including the leading period, rather than accepting the default (which will be whatever the current domain is) http://php.net/manual/en/function.setcookie.php ... So you might have something like: setcookie( my_cookie', 123, 0, , '.site.com');

Description : Is there a server-side utility that I can call from PHP to automatically resize and crop an image, such as an avatar, uploaded by a user?

Last Answer : http://www.imagemagick.org/script/index.php

Description : What is apache or perl or php or mySQL?

Last Answer : Apache, Perl, PHP, MySQL Seriously, Wikipedia does wonders. Also try searching with Google.

Description : Is it better to use single or double quotes when coding with PHP?

Last Answer : They’re actually interpreted differently. See here.

Description : Is there a server-side utility that I can call from PHP to spell check a user's input from a text box?

Last Answer : There are a bunch of them out there. Here’s a PHP spell checker class.

Description : PHP/MySQL question.... (please read on)

Last Answer : Have you looked through these?

Description : What are the differences between Perl, PHP, and Python?

Last Answer : Um, i unfortunately cannot answer this question, but I have to ask: why the NSFW tag?

Description : What is a good book for learning PHP and MySQL?

Last Answer : I’d start here: http://www.php.net/manual/en/ Get a feel for PHP, then buy books to fill in the gaps or get deeper into particular areas.

Description : How long does it take to learn PHP & MySQL?

Last Answer : The O’Reilly Head First book on this is great.

Description : Is there any way to edit php without code?

Last Answer : Nope. Because it’s more of a scripting language than a programming language like BASIC or C and than a mark up language like XHTML. PHP isn’t too hard to learn though (or so I’ve heard)

Description : PHP echo number of instances if specific word?

Last Answer : make a while loop that goes through the contents of the array. prior to the array define a counting variable and give it the value 0. during each loop, increase the value by 1 if the word “and” is encountered

Description : Server issue or PHP? - Contact Form Not Sending HTML correctly?

Last Answer : Next time use Pastebin. I think your problem is somehow HTML related, like a missing tag, or validation error. Try just sending a text email and build pieces bit by bit from. Outlook and other email ... in how they parse HTML, whereas Gmail (browser based to begin with), isn't quite as finicky.

Description : Make an archive-like page in PHP?

Last Answer : Hi Davey, Here is some quick and dirty code for your showarticlesfor($year)' function which should get the job done (NOTE: I am assuming you are using MySQL as your DBMS): function ... few breaks, and finally by the records (the while loop). References: MySQL DATE_FORMAT PHP mysql_fetch_assoc()

Description : How would I check if an XML element exists in PHP?

Last Answer : Wrap it in an if that checks for the existence first if($status->item(0)) { $eventStatus = $status->item(0)>getAttributeNode( value )->value; } and run from there, I haven't actually run your ... and does just about everything you'll want (then you can use the DOM stuff to fill in the blanks)

Description : How would I perform this operation on a string in PHP?

Last Answer : That isn’t XML, that’s HTML. Can you not grab the data in a format where times are stamps?

Description : Does anyone know how to install the GD library for PHP on Max OS X client (Leopard)?

Last Answer : Here’s a tutorial for installing the GD library for PHP on Mac OS X 10.5.

Description : Do you know webhosting server including with these details: free, about 1-2 gigabytes, php script OK, mysql OK, no adds on site?

Last Answer : Hosting a free Wordpress blog. Interesting. Did you try wordpress.com? Most hosts aren’t going to offer those serviced ad-free for free. I can’t think of a single one. Everyone needs a business model. And even if I found one, I certainly wouldn’t trust it for stability and security.