Formatting the Date and yes/no in MySQL [Solved]

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

influenceuk
Forum Commoner
Posts: 42
Joined: Tue May 08, 2007 7:48 am
Location: London, UK

Post by influenceuk »

i wasjust using PHPmyAdmin.
But after looking around on Hotscripts i now have navicat. I have sorted out the date bit, its just the yes no bit now.

its still saying 0 for no and -1 for yes. Any ideas hows to change this?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Run this query and post the resulting output (substitute your actual table for my_table_name).

Code: Select all

SHOW CREATE TABLE `my_table_name`;
influenceuk
Forum Commoner
Posts: 42
Joined: Tue May 08, 2007 7:48 am
Location: London, UK

Post by influenceuk »

guys! i worked it out!!!!

Using Navicat i have done what i been trying to do! :D

Thank you for the help. I feel like such a fool when i could of just used this piece of software :oops:

Basically using the Navicat software i was able to creat a new table, from this i worked out what was needed, my god using the GUI is so much easier :D

for the yes/no issue i needed to make the type enum and the values set as yes and no :D
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

That can be done with phpMyAdmin as well. I only bring this up because Navicat is like $100 USD for a license, where as phpMyAdmin is free. SQLYog is a bit better priced (it is the tool I use) and usually goes for about $40 per license.
influenceuk
Forum Commoner
Posts: 42
Joined: Tue May 08, 2007 7:48 am
Location: London, UK

Post by influenceuk »

Yeah i see now i think seeig it with the navicat GUI has made things a lil clearer, even just using the trial version.

I feel a lil more confident now using it.

Now i have the fun task of learning how to display the data onto a webpage and format it how i want :D

mmm time to surf the net and find a good place to find out how to format the tables, i did try basic HTML when getting PHP to format it, alas it errored though.

But you guys have been a great help :)
Post Reply