westnyorai Posted April 4, 2006 Share Posted April 4, 2006 I'm working on creating a database management script for my site. I'm having issues creating a script that will allow users to make changes to field names and datatypes.But I'm having issues returning the SQL field type instead of the PHP field type.The mysql_fieldtype command only returns string, num, blog, etc. instead of varchar, char, and such.Is there a way I can use SQL to query the information and then fetch it? Quote Link to comment Share on other sites More sharing options...
wickning1 Posted April 4, 2006 Share Posted April 4, 2006 DESCRIBE mytablename[a href=\"http://dev.mysql.com/doc/refman/5.0/en/describe.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/5.0/en/describe.html[/a] Quote Link to comment Share on other sites More sharing options...
westnyorai Posted April 5, 2006 Author Share Posted April 5, 2006 [!--quoteo(post=361774:date=Apr 4 2006, 06:23 PM:name=wickning1)--][div class=\'quotetop\']QUOTE(wickning1 @ Apr 4 2006, 06:23 PM) [snapback]361774[/snapback][/div][div class=\'quotemain\'][!--quotec--]DESCRIBE mytablename[a href=\"http://dev.mysql.com/doc/refman/5.0/en/describe.html\" target=\"_blank\"]http://dev.mysql.com/doc/refman/5.0/en/describe.html[/a][/quote]ah, cool, that actually saves me a lot more time then using php. thanks, but now i have to figure out how to return only certain parts to php, but that shouldn't be too difficult. I'll work on it later tonight after i get back from class/work Quote Link to comment Share on other sites More sharing options...
fenway Posted April 6, 2006 Share Posted April 6, 2006 Doesn't 5.0 have magic INFORMATION_SCHEMA functions for this? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.