School!

Chat about anything and everything non-Etrian related!

Moderator: ItL Moderators

1199 posts
User avatar
negzee
ItL's resident princess
Posts: 4049
Joined: Sun Aug 31, 2008 6:45 pm
Location: Minnesoouuda
Contact:

Postby negzee » Sat Apr 24, 2010 4:06 pm


User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Postby Maxine MagicFox » Sat Apr 24, 2010 11:55 pm

Barring any further setbacks, my own stupidity included, I should be able to be done with this tonight!

@_@ holy shit, I wasted a fucking hour on my own damn stupidity.

I needed a primary key. At first I thought it a good idea to make the names of an entry a primary key. So I whipped it up and then had to make codes to handle duplicate entries since they crashed the program.

Then I realized... shit... <_< a person of a different ID wouldn't be able to have the same name in the address book either! How to create an ID of some sort that is automatically generated but will not cause this issue....

So I made a field that will not show up named "PK" (Primary Key AND Player Killer - I LOVE IT!! *cough*) that is generated by the user's ID+Name fields.

EXCEPT IT WAS STILL REGISTERING AS DUPLICATE ENTRIES!! I spent an hour trying to come up with every godforsaken PK I could think up. Finally I then ripped out my error handling codes as a last ditch attempt of desperation - maybe I hadn't done it right. That's when I realized... oh my codes are perfect... I just didn't update them. I still had the program looking at the Name field for duplicates. x_x Replaced it with the PK variable and it works like a charm now. I can't believe I did that. How I overlooked it. I made the PK variable and updated the SQL commands, but I forgot that one small step. *sigh*



T-T baka ja nai.... baka ja nai!!

[] - [] - [] - []

User avatar
Kimiko
Manticor
Posts: 6044
Joined: Wed Jun 18, 2008 9:31 am
Location: Leiden, Netherlands, EU
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Kimiko » Sun Apr 25, 2010 12:07 am

Kimiko

Rewatching: Beast Player Erin


User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Postby Maxine MagicFox » Sun Apr 25, 2010 12:22 am


[] - [] - [] - []

User avatar
Kimiko
Manticor
Posts: 6044
Joined: Wed Jun 18, 2008 9:31 am
Location: Leiden, Netherlands, EU
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Kimiko » Sun Apr 25, 2010 12:48 am

?? Then what do you use to make your primary key?

As for finding and deleting the right record, that'll be easy, just let SQL do the work for you.
Kimiko

Rewatching: Beast Player Erin


User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Postby Maxine MagicFox » Sun Apr 25, 2010 1:10 am

Kimiko - I think you are misunderstanding this program.

I set the table up on the SQL side and then the rest is run through Java.

[] - [] - [] - []

User avatar
Kimiko
Manticor
Posts: 6044
Joined: Wed Jun 18, 2008 9:31 am
Location: Leiden, Netherlands, EU
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Kimiko » Sun Apr 25, 2010 1:16 am

I don't think I understand. Are you saying that you're doing more than the UI in Java? Why try to duplicate SQL's excellent database handling?
Kimiko

Rewatching: Beast Player Erin


User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Postby Maxine MagicFox » Sun Apr 25, 2010 1:22 am

Last edited by Maxine MagicFox on Sun Apr 25, 2010 3:03 pm, edited 1 time in total.

[] - [] - [] - []

User avatar
Kimiko
Manticor
Posts: 6044
Joined: Wed Jun 18, 2008 9:31 am
Location: Leiden, Netherlands, EU
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Kimiko » Sun Apr 25, 2010 3:31 am

Kimiko

Rewatching: Beast Player Erin


User avatar
negzee
ItL's resident princess
Posts: 4049
Joined: Sun Aug 31, 2008 6:45 pm
Location: Minnesoouuda
Contact:

Postby negzee » Sun Apr 25, 2010 4:51 pm


User avatar
Maxine MagicFox
ItL Webmaster
Posts: 13474
Joined: Wed Feb 27, 2008 12:20 pm
Location: Pennsylvania
Contact:

Postby Maxine MagicFox » Sun Apr 25, 2010 4:54 pm


[] - [] - [] - []

User avatar
negzee
ItL's resident princess
Posts: 4049
Joined: Sun Aug 31, 2008 6:45 pm
Location: Minnesoouuda
Contact:

Postby negzee » Sun Apr 25, 2010 5:19 pm


User avatar
Centurion_Beta
Ragelope
Posts: 70
Joined: Thu Apr 01, 2010 12:17 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Centurion_Beta » Sun Apr 25, 2010 5:42 pm


User avatar
theo
Bloodant
Posts: 232
Joined: Thu Jun 19, 2008 8:11 pm
Location: Indiana
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby theo » Sun Apr 25, 2010 9:50 pm


User avatar
Sampson
Literary Voyeur
Posts: 2809
Joined: Sun Jun 28, 2009 4:02 pm
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable

Postby Sampson » Mon Apr 26, 2010 3:17 am

So, school.

It's where you learn.

[spoiler]To be a man![/spoiler]


[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
1199 posts

Return to “Discussion Section”

Who is online

Users browsing this forum: No registered users and 1 guest