westnyorai
-
Posts
4 -
Joined
-
Last visited
Never
Posts posted by westnyorai
-
-
I'm wondering what exactly key assignments do. Can't you just create the ER diagram without using Primary and Foreign keys?
I can easily make a PHP statement that will link two databases together with just ID numbers.
Like...
Table: tableA
id: INT
name: VARCHAR
tableBLink: INT
tableAB
tableAid: INT
tableBid: INT
tableB:
id: INT
name: VARCHAR
desc: VARCHAR
if you simply need a database to connect them, I don't see what primary and foreign keys really do. I understand Unique keys though, but I don't get what UC_Fieldname(fieldname) is for.
Any insights? -
[!--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 -
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?
Simple SQL Question
in MySQL Help
Posted
Is it possible to query your results, list them in ascending order but excluding one from the ascending order that neds to be added to the end? ie ordered after query: A,B,C,D,E,G,H,I,J,K,F
[/quote]
$query="SELECT * FROM $table ORDER BY $fieldheader";
mysql_query($query);
that will arrange the data by field type. As far as placing only one at the end you would have to probably add a WHERE statement and have it list all except the one you wanted placed last. Then have it list the last one afterwards with another WHERE statement.