midnightvamp
Dec 30 2005, 06:22 AM
I'm planning on a site redesign, and I'm going to add some very basic php includes in there, because I've managed to figure out how to do them. I wanted to use them to do includes of my navigation, so I'd only have to update in one place when new links are added, as opposed to having to update several pages all at once. I'm not sure what else php can be used for, and I did a search on it, and it pretty much all said includes and databases. Well, databases, I don't know how to make, and I was wondering if it's really worth my time to figure it out or not. I'm wanting it for my language site, if you want to take a look, there is a link in my signature. It's basically several languages, and each one is split up into subcategories that list a bunch of words or phrases that people have submitted to me in their language. Right now, I'm using a simple form, that sends the data to an email, and from there, I sort it out, and add it into my website. I'm not sure if a database would save time / space / something else, but I'd like to know if it would be of any benefit to me, before I go and spend the extra time on it. Would any of you happen to know? Or have any ideas about the whole php / database idea I'm having. Should I bother? Thanks for any insights you might have.
Comment/Reply (w/o sign-up)
Tyssen
Dec 30 2005, 08:48 AM
It's going to depend on how much content, how many different categories you have, and how complex are their relationships. You can achieve a similar sort of functionality using includes instead of database entries if the nature of the included stuff isn't too complex. If you find you're having to create numerous arrays to get the different types of content into the page, then you should probably think about using a database instead. Learning how to use databases is a valuable tool but it all depends on what you hope to get out of web design/development. If you're just doing it for a hobby and feel like learning how to use databases will be a chore, then don't do it. But if you hope to make something more out of it (ie a career), then using your personal site is a great way to learn new stuff and test it out. From the look of your site, I would probably use a database to display the info cos you have a bunch of higher level categories that have common subcategories. Rather than having numerous different HTML files, you could have just one page that would display the relevant info based on the querystring. For example, instead of http://www.chromlea.trap17.com/mandarin/random.html, you could have http://www.chromlea.trap17.com/?lang=mandarin&type=random. Your page would then pull in from the database all the info relating to 'mandarin' the language and 'random' the word type.
Comment/Reply (w/o sign-up)
midnightvamp
Dec 30 2005, 09:04 AM
Oh, okay... that's making some sense to me. Thanks, Tyssen. I think I'll try messing around with a database, and see if I can't come up with something. Web design is going to be my career - I've chosen that already, and am almost through the schooling for it. I only wish that I knew how to do more stuff. I took a database class, and can't build a database to save my live if I had to, despite getting high marks in that class. It's pretty much a big joke. This semester coming up we have php, so I'll have to wait and see if that goes any better. I'm more of a designer, than a coder, but I'm not that great at either one unfortunately. I'm still trying to find my strengths in the area. So, for the part where I have one page, and pull in the information from the database - Can that be done from clicking on links? I know that inclass, we wrote some sql statements that would pull everything out of the database right when we opened the page (and we didn't click on anything, everything was just there, on a really long page...), but my instructor never explained anything that we were doing. We were just modifying the files that he gave to us. That was in design class, he thought we all knew php, even though we hadn't learned it yet. And in databases, we never learned how to hook a database up to a website just how to enter the stuff into mysql. Sorry if I sound confusing and frusterated, it's four in the morning.... and not a heck of a lot makes sense to me at this point. You are very right though, I need to learn how to do this database / php stuff if this is going to be my career, so thank you for your opinion.
Comment/Reply (w/o sign-up)
Tyssen
Dec 30 2005, 09:12 AM
I was kinda the same as you when I took a database class a few years ago. I wanted to know how it related to building a website but all we learned were SQL statements. At the time I was glad to know some SQL but still could not see what the real world application would be. It wasn't until some time later that I had to redevelop a database-driven site that I got the chance to work out to how to use queries linked to web pages. In your case, and using the example I gave above, you'd use the querystring to construct your SQL statement, e.g.: CODE Select * from languages where table = ' & $_GET['lang'] & ' and type = ' & $_GET['type']; (I've probably mixed up ASP & PHP code there cos I haven't actually gotten around to creating any PHP scripts that query a database, whereas I have with ASP.)
Comment/Reply (w/o sign-up)
truefusion
Dec 30 2005, 01:34 PM
Since web design is what you plan on being your career, I would also suggest studying ASP, after learning databases and whatnot, if you havent done so already. Since you might be seeing it in some/many job requirements. Although, in my opinion, PHP is easier and can do practically anything that ASP can. But, I digress. Knowing databases, MySQL, or any others, is beneficial. But, one downside of using a database is downtime. When the database is inaccessible, your website wont display anything from the database.
Comment/Reply (w/o sign-up)
midnightvamp
Dec 30 2005, 04:48 PM
Is down time a big problem in databases? Does it happen often, and is there a way to redirect people to a page saying something along the lines of 'the database is currenly on the fritz... but be sure to check back in a few hours (or days, I don't know how long they typically go down for)? I did take asp, and I know some of it, but again, I didn't leave that class feeling nearly as comfortable with the language as I would have hoped. Plus, I've heard other people say that php is more common nowadays, plus easier to learn and more expected to be learned for today's job market. --- And thanks for the code example, Tyssen it looks somewhat familiar to the commands that we had to do in design class, and that was apparently php, so I'm guessing they are similar. I'm going to first try and set up a database, and then keep messing around and see what I can get out of it. I'm pretty sure that I can make a nice back end to it all, that'll let me update the database easily, which is one thing that I'm really looking forward to. I'd also like to add the ability to display the contents alphabetically in either the foreign language, or in English. I think I have my work cut out for me. But at least, like you said, playing around with it all on my personal site will get me much more familiar with the language, so that I can use it more readily in the future.
Comment/Reply (w/o sign-up)
sammaye
Dec 30 2005, 05:30 PM
i often use php with MySql and downtime is not a problem in my scripts. The only down time you might get is when you mess with the scripts and change conn.php or something. other than that the only problems ive had is with server down time and I mean I have been using them for like a year now, but some people may have had different experiences with php and databases. Php and MySql is is way more cvommon than php and some other database my guess would be that the trap17 forums uses MySql back end but you never know they may use something else. And also PHP can be a steep learning curve if you are trying to learn how to use it with databases at the same time (so many spelling mistakes and typos and little commands to remember so you dont have tio flick through the book every 5 secs...reminds me of Visual basic)...I got so fustrated so many times when I was learning how to code even the basic forums. The best way I learned php was to break the scripts then try and mend them again...sounds kind of stupid but soon I could patch up scripts and then I learned from websites about php at same time and soon I was able to write my own scripts. Best way of learning a language doesnt always require a lot of reading...it can have practical as well. but thats how I learnt php...others will disagree with me fully...
Comment/Reply (w/o sign-up)
snlildude87
Dec 30 2005, 11:51 PM
If you're going to dive into the world of databases, use this: http://sunsite.mff.cuni.cz/MIRRORS/ftp.mys...0.9.2-win32.zipIt's a control center for mysql that lets you see things in a neat little table. It definitely helped me. I started using mysql about 2 weeks ago (my site is now powered by it), and this tool helps me to make quick and easy changes to my table without using a script.
Comment/Reply (w/o sign-up)
midnightvamp
Dec 31 2005, 12:12 AM
Good to hear that down time isn't a problem, sammaye. So long as I don't go and mess up my site (which I think I'll probably be the one who would do that lol...). I know what you mean about the breaking the code and fixing it up to learn how to do it. In certain classes that I've been to, one I remember was java, we had to break it, so we'd get familiar with the errors that we received and then we'd have an idea of what to do to fix it. ---- Oh, excellent snlildude. I'll have to try that out. Thanks! You say you just started with databases only a couple weeks ago, and now your site is powered with it! That's incredible! I didn't know it could be done so quickly. It certainly makes me feel a little less worried about the whole process.
Comment/Reply (w/o sign-up)
snlildude87
Dec 31 2005, 12:39 AM
Another site that really helped me learned was http://hudzilla.org/phpbook/read.php/9_0_0It's everything you need to know about databases--selecting, inserting, updating, dropping. If you want see examples, click on Table of Contents, and then go to the Practical PHP chapter. As always, you can always use the php website for help on syntax: http://us3.php.net/manual/en/ref.mysql.phpDifferent MySQL query syntax can be found on their website at http://dev.mysql.com/doc/refman/5.0/en/select.html. That's just the SELECT query. There are more on the left. Good luck!
Comment/Reply (w/o sign-up)
sammaye
Dec 31 2005, 10:56 AM
snlildude87, forget about that program you offered midnightvamp, Myphp was the best one I ever found. It is designed to use mysql and php together which is perfect for a site... And yeah databases can be seen now  ...the trick i always used to use to get over that was to of course use a php front to it and add meta tags and allow google to spider, i mean google can spider anything even databases and word documents and such like... oh and I saw this briliant program some time ago it allows you to simulate your scripts and you can change them in any way without actually harming your database and such like (this is direct from the server), it works like creating a temp file or something which you use and then when your done it will save all the changes to your actual php file. I might look for it again it will come in handy for my site...
Comment/Reply (w/o sign-up)
midnightvamp
Dec 31 2005, 05:12 AM
Wow... that makes me incredibly happy! You have no idea. I've been spending the last couple of days planning out a big redesign... and when I read that search engines didn't like dynamic pages, I was getting all flustered. Thanks for that. I needed it!
Comment/Reply (w/o sign-up)
Tyssen
Dec 31 2005, 04:55 AM
QUOTE(midnightvamp @ Dec 31 2005, 02:44 PM) Okay.... I just ran across something when I was looking into databases. Apparently, they aren't easily seen by search engines, because they are dynamically created. That's not a good thing, because all my visitors come from search engines.
That was the case a few years ago - not any more. This article talks about it.
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : database, php, thing, worth, inexperianced
- Ms-access Database Question
Allowing Web Access to the Informaton (3)
How Do I Connect To Live Database With Php Script?
while being hosted with ComputingHost (6) I am not new to programming. I want to create a form to add some values into my tables, the code
are all working. But I am not sure what is the URL to connect to my site's database. All along,
I have been testing through MAMP, which provides a local copy of mySQL. Can anyone lend me a hand?
My site's URL is http://limetouch.com/ ....
Connecting Php Site To Database
(6) Please Help Me with this site's error http://gatewaybiz.x10hosting.com/surf/ ....
Can Database Column Names Start With A Number?
Can database column names start with a number? (1) Can database column names start with a number or must they start with a letter like php vars? Like
my_table.1fieldname ? Does this vary from db system to db system? Is it considered good/bad form? ....
Auto Pruning An Sql Database With Php
How can i do this? (5) Hey all. Now i have a DB, an SQL DB, and i need to auto prune the data there to delete rows lder
than a certain time, lets say 2 months for now, the question is how do i do this? The obvious thing
is just to add a field which is the numerical representation of the month when the data is entered
and every time the DB is accessed it will check this number against the current month,in a numerical
format, and if the difference is two or greater that row is deleted, so if the month is January, it
would be O1 and if the current month is march then it would be O3 and the diff....
Read Xml And Import Into Database
question (2) hi all , i have one big problem i need to know , how i can read xml file and then save strings in
xml in database for example its my xml CODE 1 2 i want my soruce read this xml
file and then save string into arash field in mysql database for example in this source arash
string is " 1" and kiarash string is "2" my fields in mysql are standard and we have 2 field with
names "arash" and "kiarash" please help me , if you know some tut about this subject thanks
/wink.gif" style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> ....
Download Database Backup
Download Database Backup (0) Hi all i want write backup system like Phpmyadmin export in single file , my question is what is
backup query ? i must write manul query for backup for example loop query to get string form
database and write into one file or php have backup query ? thanks /wink.gif"
style="vertical-align:middle" emoid=";)" border="0" alt="wink.gif" /> ....
Editing Information In A Mysql Database And Deleting Rows
(5) I need help with a couple of things. First, I need to know how to retrieve information from a mysql
database and edit it then re add it to the database. I also would like to know how to easily delete
a mysql row. And I want this done without going to phpMyAdmin. Thanks for the help!....
Importing .csv Into Mysql Database
NEED HELP! (6) I need help importing a .csv contents into a Mysql database. I have this. But its not working.
CODE connection = mysql_connect("******", "**********", "********") or die ("Unable to connect
to server"); $db = mysql_select_db("b9_259782_CC", $connection) or die ("Unable to select
database"); fopen ('csvranks.csv', 'r'); mysql_query("INSERT INTO test_table (id,
name, guild, level, exp) ?> What am I doing wrong? The mysql table is all set up.. Any help
is GREATLY appreciated. If you need more info just ask. Thanks! EDIT: The CSV file looks l....
Php Search Engine Script For Mysql Database
(11) A search engine is provided to facilitate the user with undemanding and clear-cut search options.
The search facility includes simple search, search by title, search by word/phrase, ect… Thus, the
user is at a safe distance from the risk of selecting files/folders ambiguously. In addition, a
history of recent searches can be preserved for future perusal. Now
day’s visitors have a large option for his needs on internet and so visitors are not vesting their
time by following the dead links on your site. So a search engine is essential for your....
Problem To Join Tables In Database
Problem in joining (many to many) relation (3) Please help me. I'm building a group of database fro a program. the situation is like this:
'user' may have 1 or more class(es). 'class' itself may have 1 or more user in its
classroom. I'm bad at explaining... maybe like this: A program is made to write data of
classroom. Hikaru has a math class at Monday and statistic class at Tuesday. The math class itself
consists of about 50 students in a classroom. So, Hikaru (user ) may have one or more class at
time, math class (class) may have one or more students at time. So, basically I must mak....
File In Database
Question.thanks (1) Hi all i write this code i want when you see download.php (this code) my file goes for download for
user sorry my english is not very good its a file database project for my university but when i
browse this code my soruce file (.zip) echo in my page and dont goes for download my next querstion
about safe mode i saw (php.net and zend) when safemode is on file databaseing and header() is not
working . is it true ? if is it true i save my file at hosting and no (database) i want write
standard script . plz help me thanks more and more CODE include("config.php"); $kind....
Code To Install Mysql Database Table?
(5) Can anyone show me example code of how to install a database table instead of me having to upload an
file with it in, so i can do it from a php page? Thanks in advance ;-)....
Showing Numbers Of Mysql Entries In A Database Table
It should be easy, but I don't know how... (7) I have a database, and need to know how to show the numbers of entries. So, if there are 10 entries
in the selected database table, it will show the number 10 . I'm pretty sure this should be
easy, but I don't know how to do it. Can someone tell me? /smile.gif"
style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" />....
Crontab Automated Database Backup
using crontab to make automated database (2) i'd like to make an automated database backup as following: 1- i would like to optimize my
databse's tables. 2- I would like to remove any existing backup tarfile. 3- I dump the database
to a /tmp file. 4- I tar the database dump and then delete it. i wrote the following shell: CODE
#!/bin/sh rm -rf /tmp/mybackup.sql.tgz mysqldump -uroot -pmypass --opt mybackup >
/tmp/mybackup.sql.backup cd /tmp/ tar -zcvf mybackup.sql.tgz mybackup.sql.backup rm -rf
/tmp/mybackup.sql.backup ....
Login / Authetication System Using Database
adding information (4) Is there any way to make such database where I can write like name and passwords.. Then make an
login box, and when somebody trys to acces the login he needs to write the name and password.. Then
it is verifyed if is there such name and password and if it is then acces the page.. I think there
is posible something like that with MySQL (db).. but can anybody say me a script or way to make
something like that? Alredy thanks......
Can You Add Images Into A Mysql Database?
Using Php? (21) I'm learning php in class right now, but I'm still not that good at it, what I'm
wondering is when I write the php so that it can connect with a database, can I at the same time
have it that it is able to display back images that I choose. Like, I want a search feature, where
you can search for a keyword, and it will bring back a list of all the possible entries with that
keyword, but each of these entries will have a photo associated with it. Now, do I put these image
files directly into the database, or do I write the code to link them from my files to th....
Database Extraction Layer
Does php has Database extraction layer? (1) Hi PHP geeks, Do you know if php has Database extraction layer? like Java has. Which is used for
development of database layer, so it become easy to change the database if you wish to without
modifying so much code underneath.... Any ideas is welcome. I am sure there should be something
which is being used and reliable and mature. I am new to PHP so want to use it if it is there. Good
to know from experienced developer about there developing experience. Thanks in advance.....
Script That Deletes A Row In A Mysql Database Usin
(1) I have just made a script that deletes a row in a mysql database using an image as a button.
However it will only work in FireFox and not in IE. Can any one see away around this and help me
root out the problem. This is the script in short: PHP Code: CODE $query_products = "SELECT *
FROM manufacturer ORDER BY name ASC"; include('external_files/pagination.php'); // If
the form was submitted, delete the items selected from the database if(isset($_POST )){ $query =
'DELETE FROM manufacturer WHERE manufacturer_id = '.(int)$_POST ; // or die() d....
Personal Blog
[ Database Required ] (4) Okay, after a week, I have successfully created a personal web blog. I first created it using a flat
text file, I but realized that it was just too limited like that. So, I redid it in a
database-compatible manner. NOTES: CODE - This blog does not support comments yet. If you
want, you can build on this script by creating a comment system as well. I may also update it
with a comment system in the future. - You should have an average to intermediate knowledge of
MySQL commands and database manipulation in general, especially if you want to add a ....
Help Importing Mysql Database Results
Need help formatting link (3) I am having trouble formatting my table to display the results of a mySQL query the way I want.
Here is the part of my code: CODE $result = mysql_query("SELECT * FROM uploads WHERE
Category='Drama'") or die(mysql_error()); ?> Title Author File // keeps getting
the next row until there are no more to get while($row = mysql_fetch_array( $result )) { // echo "
"; echo $row ; echo " "; echo $row ; echo " "; echo $row ; echo " "; } echo " "; I want to
make 'Title' show as a hyperlink to 'File' but am at a loss as to how to d....
Writing To Database Problem With Mysql - Not Writing Forum Post
(3) I'm making a forum and I've had several problems tonight which I've come here to ask
then found the answer to myself, but this one is stumping me. Whenever it goes to write the post to
the database, it saves the poster, and the time, but the part where the message would go is empty.
Here's the code, with comments about what it's supposed to do (what I wanted it to do and
thought it did): CODE $imsg = stripslashes($_POST ); //Get message if(strlen($imsg) > 5 &&
strlen($imsg) { $imsg = htmlspecialchars($imsg); //Change stuff to entities $imsg....
Mysql Edit
editing info in a MYSQL database (4) I have a simple database with a php form thats inserts the info into the database, and another file
that extracts the info to display the info on another page.... Now my question is ......how do i
add the EDIT button to edit the database??? here is my database CODE CREATE TABLE `businesses`
( `id` int(10) NOT NULL auto_increment, `business` varchar(255) NOT NULL default '',
`description` text NOT NULL, `emailaddress` varchar(255) NOT NULL default '', `website`
varchar(255) NOT NULL default '', PRIMARY KEY (`id`) ) TYPE=MyISAM A....
Chatbox / Guestbook
No Database required (2) Okay, this is a simple script that lets your visitors enter in messages via a chatbox/guestbook. You
can use this how you like. Adjust it if need be. It's very simple, so there is much room for
improvement. Enjoy! CODE echo " "; echo "Name: "; echo "Message: "; echo " "; echo " ";
CHATBOX.PHP if(isset($post)) { if(file_exists('chatbox.txt')) { $fileId
= fopen('chatbox.txt', 'a'); fputs($fileId, $_POST );
fputs($fileId, $_POST ); fclose($fileId); } else { $....
Reversing The Order Of Items In A Database
How do you do it? (4) I have a chat PHP script, that I need a little help with. I'm wanting to use PHP/MySQL so that
it will show the most recent message first. What it's doing, is showing the oldest message
first, and newest message last. Is there something I can do to reverse the order of the messages?
Thanks. (I know...I've had to ask for PHP help often, but I can't quite get a PHP book
right now...sorry)....
Guestbook Script
(Using Flat Files, no database) (2) Okay, I wrote a cool little Guestbook script a few weeks ago. It is very simple (one page of php)
that uses flat files (text files). Using this script, you never need to use a database (you can if
you want, but that's up to you). Anyways, here is the php code. Enjoy! CODE "; print "*
Your name: " . " "; print "Email: " . " "; print "Website URL: " . " "; print "Website Name: " . "
"; print "* Comments: " . " "; print " "; print " "; print " "; if(strlen($yourName) > 4 and
strlen($comments) > 10) { $newEmail = " " . $email . " "; $newWebUrl = " "....
Looking for database, php, thing, worth, inexperianced
|
Searching Video's for database, php, thing, worth, inexperianced
|
advertisement
|
|