I need some ideas for projects, working with PHP/MySQL

I need some ideas for projects, working with PHP/MySQL

Other urls found in this thread:

dba.stackexchange.com/questions/14252/how-to-model-double-relationships
code.tutsplus.com/articles/sql-for-beginners-part-3-database-relationships--net-8561
twitter.com/NSFWRedditGif

Give me ideas I'll give more of her

will you do my uni homework?

If it's programming and no more than 100 lines then sure

Store locator

it is and actually I think it is pretty basic, but for me too complicated. can i send you mail? I will repay you somehow :D

Your idea was shit

Send it here [email protected] and I'll copy it

First Year At Uni?

I'm OP not that guy. Don't go uni yet

Give me some ideas adkshskjg

i need one welcoming page with two links one to CRUD with animals, and one with CRUD with guards. What is difficult for me is that when you display animals in base you need to also display id of guard who feeds him, and one who guards him.

Sports bracket calculator

So you need to use primary and foreign keys in mysql?

yes

Okay that's at least 200 lines of code, give me some ideas first

this is shitty representation of what i need

what level? How big do you want your project to be? For your uni?

small and simple. Really something easy, because this double relation is "trick" part.

>double relation is "trick" part.
So you are new to this and we HAVE to use double relation. Right?

thats true. because "Create, read, update and delete" part is easy (or it should be easy - i'm not clever girl), but I need to represent this relation

OK. So i can tell you that the most common example for this is: Customer -> Order items.

This is the most common example that you can find in books!

Soooo the theory of this (if you want to learn it in a good level) is here:
dba.stackexchange.com/questions/14252/how-to-model-double-relationships

The "practical/to do" thing is here:
code.tutsplus.com/articles/sql-for-beginners-part-3-database-relationships--net-8561

The example i gave you (as i told you) is the most common example in all books. That will help you... if you "stuck", you can find a lot of things by googling!

Any question?

>"Create, read, update and delete"
And BTW... if you are going to be a developer.... you should start talking like it

"Create, Read, Update, Delete" = CRUD (look at the initials!

Thank you for links AND your time. I will try it.

> if you are going to be a developer.
with my current skillset, future is not so bright

Well i know a few completely retarded persons who are developers and they are pretty fucking good. Developing is all about practicing and commitment to this. If you like it... just spend a lot of time on this!

Good luck you little noob. You should have more confidence!

damn, man, that is actually really sweet.

;)

The relationship between the Animals and the Guards is many-to-many

>many Guards feed many Animals
>many Animals are guarded by many Guards

So you need a link-table to store the many-to-many relationships.

The task is either guard or feed (1, 2) or ("guard", "feed").

I've been reading previously posted links, and this is actually very helpful. Who knew Sup Forums is so kind these days.
I will try to implement this today. *fingers crossed*

it's been a few years since i actually wrote an SQL Query since I mostly work with frameworks and MVCs now, but this query looks right if you want to get all the animals that are guarded by a few guards

SELECT animals.* from animals
JOIN animals_guards ON animals_guards.animal_id = animals.id
JOIN guards ON animals_guards.guard_id = guards.id
WHERE guards.id IN (GUARD_ID_1,GUARD_ID_2,GUARD_ID_3)
AND animals_guards.task = "guard"

you should make a application that can update stuff. And also, it would be great if a user could delete shit.

your project should be discarding both of those and making something else(use nosql/js)

So you want do do some pretty basic shit and you have no intellectual capacity to do it on your own? Bro, this is a friendly advice for you: give up and go work for McDonalds.

thanks, I'm doing crud right now and will try it.

the thing is, I am beginner and these are friendly tips. why you so mad? and I can always be a stripper so... life ain't that hopeless.

CREATE PROC selectEm
@id_animals_id varchar(50)
AS
BEGIN
SELECT * from animals
JOIN animals_guards ON animals_guards.animal_id = animals.id
JOIN guards ON animals_guards.guard_id = guards.id
WHERE animals.id = @id_animals_id
END

just to correct you