Oprano Front Page


Go Back   Oprano Adult Industry Forums > The Business Of Porn - Closed For Posting > Legacy Archived Main Board

Notices

Legacy Archived Main Board Business chat and general industry chat. All participation is welcome. Dont post your fucking spam here.





Check Out YnotMail

The Original Oprano Flat Board (Thanks To Sarettah!)---
Oprano Swag Shop
"History Of Porn Timeline
Reply
 
Thread Tools Display Modes
Old 02-02-2008   #1
Hell Puppy
Fat Fucking Nobody
Want to see your own Advertising Here!
 
Hell Puppy's Avatar
 
Join Date: Oct 2002
Posts: 6,523
Default Re: Php & Sql

Quote:
Originally Posted by Nymph View Post
Ok, who is the wiz kid here?

I want to do something with a script I'm running, and not real sure how.

I know I would need to make another table in the sql database I already have for this script...I'm pretty sure I can copy the format of one of the other tables for this.

Next is putting the data in it. I know from what page I need to add it...form style...not sure on the format to get it to insert in the table.

Next is the call to the page for it...big questions on that one.

If anyone would care to give me some pointers, I'd really appreciate it.
Your questions are pretty vague. So my initial suggestion is hit Amazon and find yourself a good PHP and MySQL book that suits your skill level.

I can give you some feedback based on what you say above.

First off, you say you can copy the format of an existing table. No way I can say for sure without knowing EXACTLY what you're doing, but a well designed database is the key to having a maintainable, scalable site that performs well. It starts with your database schema, and thus your table designs.

Before deciding how you want to store data, you must think thru how you want to pull the data back out.

Let's say you're creating a database with recipes in it. Seems simple enough to have a single table in there with all of the fields you might want to capture for each recipe yes? And that indeed would work, but it's gonna be a slug on searchs if the database gets very large, and you may limit your search capabilities or make them require extremely complex sql to extract.

What if I want to search recipes by ingredients? Let's say I want to pull back all recipes that have chicken, tomatoes, and garlic. If I didn't design my schema correctly that's a bitch. If I did, it's easily done and very fast.

Consider another scenario. You store recipes by author. Do I put the author in the recipe table? Or do I cross link to an author table? The correct answer is normally cross link. Why? Many reasons, but what if one of the authors wants to change their "handle" or avatar or email address. If it's all in one table, again, that's one god awful nasty query to write. If it's in a separate table, I update one row and it'll display with the update on every recipe in the database when it's pulled back.

As for taking data from forms and inserting into the database, well, that's a big part of what PHP does and it does it well. It'll collect your form data from the POST or GET, then you can manipulate it as you see fit and use PHP to build SQL statements to pass to MySQL to manipulate the database accordingly.

Again your initial questions are too broad, if you get to a point where they're more narrow such as specific SQL queries you need built, post and I can help.
Hell Puppy is offline   Reply With Quote
Old 02-02-2008   #2
Nymph
Industry Member
 
Nymph's Avatar
 
Join Date: Mar 2003
Location: The Redneck Riviera
Posts: 739
Default Re: Php & Sql

Quote:
Originally Posted by Hell Puppy View Post
Your questions are pretty vague. So my initial suggestion is hit Amazon and find yourself a good PHP and MySQL book that suits your skill level.

I can give you some feedback based on what you say above.

First off, you say you can copy the format of an existing table. No way I can say for sure without knowing EXACTLY what you're doing, but a well designed database is the key to having a maintainable, scalable site that performs well. It starts with your database schema, and thus your table designs.

Before deciding how you want to store data, you must think thru how you want to pull the data back out.

Let's say you're creating a database with recipes in it. Seems simple enough to have a single table in there with all of the fields you might want to capture for each recipe yes? And that indeed would work, but it's gonna be a slug on searchs if the database gets very large, and you may limit your search capabilities or make them require extremely complex sql to extract.

What if I want to search recipes by ingredients? Let's say I want to pull back all recipes that have chicken, tomatoes, and garlic. If I didn't design my schema correctly that's a bitch. If I did, it's easily done and very fast.

Consider another scenario. You store recipes by author. Do I put the author in the recipe table? Or do I cross link to an author table? The correct answer is normally cross link. Why? Many reasons, but what if one of the authors wants to change their "handle" or avatar or email address. If it's all in one table, again, that's one god awful nasty query to write. If it's in a separate table, I update one row and it'll display with the update on every recipe in the database when it's pulled back.

As for taking data from forms and inserting into the database, well, that's a big part of what PHP does and it does it well. It'll collect your form data from the POST or GET, then you can manipulate it as you see fit and use PHP to build SQL statements to pass to MySQL to manipulate the database accordingly.

Again your initial questions are too broad, if you get to a point where they're more narrow such as specific SQL queries you need built, post and I can help.
You are right, I was to vague. I have been driving myself nuts trying to get everything back up online the past week, and brain thoughts seem to come out all jumbled at times

I am working with a recipe script, one that I have used for a few years. Everything is functional on it, but I wanted to add a new field. I'm not very familiar with PHP, if this was a cgi script, I'd have it in a heartbeat.

In the current category field, it just has a place to put in the category name. I want to add a a field for a decrtiption, or little intro of that category.

Here is one of the recipe sites I'm talking about, http://www.bbq-grilling-recipes.com and yes, it's still quite empty, but I'm working as fast as I can to get it filled back up again.

I'm probably wanting to do something with it, that isn't going to be able to happen...but that's just the way my life has been the past few months.
Nymph is offline   Reply With Quote
Old 02-03-2008   #3
KevinG
Members
 
KevinG's Avatar
 
Join Date: Oct 2003
Location: Ft. Lauderdale, FL, USA
Posts: 654
Default Re: Php & Sql

That looks like a nice site Nymph. I have an exclusive recipe section on my Cigar Review site.

Are you sure the script doesn't handle the MySQL stuff for you? It is common that they do.
__________________
I am available for Consulting, Design, Traffic, Marketing and SEO for adult and mainstream.
Contact: kevin@kevingodbee.com ICQ: 271-024-660
Web 3.0 Internet Consulting
KevinG is offline   Reply With Quote
Old 02-03-2008   #4
Nymph
Industry Member
 
Nymph's Avatar
 
Join Date: Mar 2003
Location: The Redneck Riviera
Posts: 739
Default Re: Php & Sql

Quote:
Originally Posted by KevinG View Post
That looks like a nice site Nymph. I have an exclusive recipe section on my Cigar Review site.

Are you sure the script doesn't handle the MySQL stuff for you? It is common that they do.
Thank you, maybe once I get it all back together, we can trade links.

Nope, the script does about everything else, except of course, what I want right now.
Nymph is offline   Reply With Quote
Old 02-05-2008   #5
Jace
....
$100 for every ImLive sign-up
 
Join Date: Mar 2004
Posts: 4,392
Blog Entries: 1
Default Re: Php & Sql

you know, I ALWAYS forget about Google Books

http://books.google.com/books?id=fGz...TJbfTkwhFRi3Dc
Jace is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Forum Jump


All times are GMT -4. The time now is 04:30 PM..


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Copyright Evil Empire Inc. 2006-2022