Having trouble learning MySQL database codes...
View Single Post
01-03-2008, 07:49 PM
Join Date: Nov 2007
Well you're trying to understand the theory and relatively good at the practice of it and as many have learned you either learn the theory first and then the practice or learn the practice and then the theory. so that means just take it at face value that a million tables is more efficient then one big one... (unless someone would like to explain, for I'm more practically sided and not learned in the theory concerning mysql and the such)...Putting that aside.
The select statement is actually very simple, lets show you two such queries you'll be continously using in a cms type enviroment.
Select query -
SELECT `item` FROM `table`;
This query would select the column called item
SELECT `item` FROM `table` WHERE `value`=1
This query would select a single item from the column which
has the row where `value` is equal to one
SELECT `item`,`item2` FROM `table` WHERE `value`=1
This query would select two peices of data one from colum
'item' and the other from column 'item2' and it would select
it from the row where the column 'value' has a value of 1
Insert Query -
INSERT INTO `field`(`id`,`column`,`column2`) VALUES('1','data1','data2')
All this query does it insert a new row into the field called
'field' and it inserts 1,data1,abd data2 into id,column, column2 respectively.
View Public Profile
Send a private message to TlcAndres
Find More Posts by TlcAndres