Multi Column Primary Keys in MySQL Connector V2

Issues related to forms.
Post Reply
ConcordKen
 
 
Posts: 3
Joined: Mon Sep 15, 2025 8:20 pm

Multi Column Primary Keys in MySQL Connector V2

Post by ConcordKen »

Hi All,

First post, sorry if this was answered elsewhere, but I couldn't find it...

I have a Client Table, primary key is ClientID and an Events table, where clients can have multiple events. Each table is being displayed on a separate form. Primary key for Events is made up of both ClientID and EventID. I have been trying to implement this using the MySQL Connector V2 and I am getting an error. It could be for a few reasons.

First, I am trying to pass the ClientID from one form to the other using a Hidden Field option. I might be misunderstanding how that works and I also might be implementing it incorrectly. Help here would be most appreciated. Basically, how do I pass a ClientID value from one form to another. I have been looking for good examples, but I haven't found any.

Second, I am trying to implement the two column primary key in the MySQL Connector V2 by putting ClientID, EventID in the Primary key field and this "ClientID = Client_ID AND EventID = 1" to see if I could get this to work. So far, no luck. Again, any help would be appreciated.

Thanks!
User avatar
Pablo
 
Posts: 23879
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Multi Column Primary Keys in MySQL Connector V2

Post by Pablo »

It will be very difficult to help without knowing the exact configuratrion.

But, I am not sure if this can be done without programming. This is a very specific use of the MySQL Connector V2, it was not designed to be used this way.
ConcordKen
 
 
Posts: 3
Joined: Mon Sep 15, 2025 8:20 pm

Re: Multi Column Primary Keys in MySQL Connector V2

Post by ConcordKen »

Thanks for the response.

So, is there another connector to MySql that you know of that can pass data from a form on one page to form on another page? Seems weird that there is no standard way to pass data from one page to another, or that a form can only point to one database. Can you have two forms on one page? Each pointing to a different database? Could you pass data that way?

As an alternative, is there any way to double click on a table row and subsequently open up another form pointing to another database?

One last point of attack... I have many years experience programming in multiple languages. When you say this needs to be done via programming, can you recommend a programming language to do this with?

Thanks again!
User avatar
wwonderfull
 
 
Posts: 1620
Joined: Fri Aug 21, 2020 8:27 am
Contact:

Re: Multi Column Primary Keys in MySQL Connector V2

Post by wwonderfull »

ConcordKen wrote: Mon Sep 29, 2025 9:03 pm Hi All,

First post, sorry if this was answered elsewhere, but I couldn't find it...

I have a Client Table, primary key is ClientID and an Events table, where clients can have multiple events. Each table is being displayed on a separate form. Primary key for Events is made up of both ClientID and EventID. I have been trying to implement this using the MySQL Connector V2 and I am getting an error. It could be for a few reasons.

First, I am trying to pass the ClientID from one form to the other using a Hidden Field option. I might be misunderstanding how that works and I also might be implementing it incorrectly. Help here would be most appreciated. Basically, how do I pass a ClientID value from one form to another. I have been looking for good examples, but I haven't found any.

Second, I am trying to implement the two column primary key in the MySQL Connector V2 by putting ClientID, EventID in the Primary key field and this "ClientID = Client_ID AND EventID = 1" to see if I could get this to work. So far, no luck. Again, any help would be appreciated.

Thanks!
If you have 2 keys then I think one of them is primary key the other is foreign key which, I am sure. That means it is a relational table. Basically, on phpMyAdmin we can edit such tables without any issue, but I am not sure if MySQL Connector V2 was made for such work.
One last point of attack... I have many years experience programming in multiple languages. When you say this needs to be done via programming, can you recommend a programming language to do this with?
Any language which provides you easiest of solution would be the default pick I would say. You can try with some js for the client side and php for the backend.
User avatar
Pablo
 
Posts: 23879
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Multi Column Primary Keys in MySQL Connector V2

Post by Pablo »

There is no dedicated extension for this purpose, this will require custom coding.
You can have multiple forms per page, although it is recommended to use one form per page to prevent conflicts.

A common used programming language for accessing MySQL is PHP

Note that any code that works elsewhere, will also work with WWB.
User avatar
onlye
 
 
Posts: 480
Joined: Sun Jun 17, 2018 12:36 am
Location: Gluckstadt, MS USA
Contact:

Re: Multi Column Primary Keys in MySQL Connector V2

Post by onlye »

this may be a little out there but - i have used a couple of php code generators for some pretty simple projects. the lessor expensive one is called appgini. uses a graphic interface and appgini creates the php code. then you could use an iframe to implement your php app into your wizzy website. if i'm too far offbase, my apologizes.

https://bigprof.com/appgini/
Last edited by onlye on Wed Oct 01, 2025 10:05 pm, edited 1 time in total.
onlye
Gluckstadt, MS USA
ConcordKen
 
 
Posts: 3
Joined: Mon Sep 15, 2025 8:20 pm

Re: Multi Column Primary Keys in MySQL Connector V2

Post by ConcordKen »

Thanks for all your responses! I will try your suggestions and see if I can get further along.
Post Reply