Jump to content

[SOLVED] New to PHP and mySQL PLEASE HELP


desert_gold_hound

Recommended Posts

NEW HERE and to web languages. I am doing pretty well studding from w3school.com. I am trying to build an application for our grooming shop that we can keep track of customers. This is not an appointment book just a customer reference. I am using 5.0

 

I have the following DB's

 

Customer

Phone = With FK to Customer = Some have 5 or 6 numbers this is why its in its own db

Pet = With FK to Customer

GroomingInfo = With FK to Customer

 

What I am doing is building the forum to input a new Customer, 1 phone number, and 1 pet. I figure they can add more and the grooming info once that is created.

 

My problem is how do I get the CustomerID (it puts its own value in so there is no chance of user error) so that the form can add the FK to the Phone and Pet?

 

I would like to get this in the forum of a Variable such as $custID and then use that. I tried to use the mySQL command LAST but couldn't figure out how to make this work. I tried using it similar to this. $custID = mysql_query(SELECT LAST * FROM CustomerID); and that didn't give  me anything not even an error.

Link to comment
https://forums.phpfreaks.com/topic/151267-solved-new-to-php-and-mysql-please-help/
Share on other sites

You don't understand it........I asked it and I am confused LOL  ??? I am learning it prety fast, however; there is sooooo many different things to try and tie together.

 

Thanks I think you answered my question though. TY TY TY

You don't understand it........I asked it and I am confused LOL  ??? I am learning it prety fast, however; there is sooooo many different things to try and tie together.

 

Thanks I think you answered my question though. TY TY TY

 

I thought it might let me edit this but cant. Just wonted to let you know it worked PERFECTLY. It was just what I wonted.

FYI: You put this in the PHP Regex section which is entirely the wrong place.

 

Glad to see you got it working, please mark as [sOLVED].

 

Where should I have placed it? I was debating between this and mysql as this is a mix of both.

 

How do I mark it solved? is this something specific to this forum?

Where should I have placed it? I was debating between this and mysql as this is a mix of both.

 

Probably PHP Help since it was a PHP function, or MySQL would have done fine.

 

How do I mark it solved? is this something specific to this forum?

 

There is a tab at the bottom right that looks like, "[sOLVED]".  I think it's a mod for SMF forums, although it may be standard.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.