Search found 79 matches
- Wed Jul 27, 2005 12:10 pm
- Forum: Databases
- Topic: what does an INDEX mean?
- Replies: 1
- Views: 347
what does an INDEX mean?
I created a table "purchase" by following SQL: (acturally I copied code somewhere and modified it) CREATE TABLE IF NOT EXISTS purchase ( custid VARCHAR(20) NOT NULL, discript VARCHAR(50), INDEX IND_KEY(custid), FOREIGN KEY(custid) REFERENCES customer(custid) ON DELETE CASCADE )TYPE = INNOD...
- Wed Jul 27, 2005 11:23 am
- Forum: Databases
- Topic: need suggestion: fields for money
- Replies: 6
- Views: 778
- Wed Jul 27, 2005 11:08 am
- Forum: Databases
- Topic: need suggestion: fields for money
- Replies: 6
- Views: 778
need suggestion: fields for money
waht kind of fields do you use for currencies (money)? i.e. a good may be sold in different currencies, i.e. $100.10 US dollars or $60.32 EU dollars, how do you describe the situation? I prepare to use: (field 1) DOUBLE for amount of money (i.e. 100.10) (field 2) CHAR(20) for type of money (i.e. US)...
- Wed Jul 27, 2005 8:41 am
- Forum: Databases
- Topic: type of tables for relationship between them
- Replies: 5
- Views: 358
hi, thanks for reply. 1. --------------------------------- further question about field type: CHAR(M) M bytes, 0 <= M <= 255 VARCHAR(M) L+1 bytes, where L <= M and 0 <= M <= 255 BLOB, TEXT L+2 bytes, where L < 2^16 if so, TEXT and VARCHAR are better than CHAR from size of storage's view. For example...
- Wed Jul 27, 2005 2:54 am
- Forum: Databases
- Topic: type of tables for relationship between them
- Replies: 5
- Views: 358
type of tables for relationship between them
questions:
1. I read an article on the internet which says:
type of tables must be created as innoDB for generating relationship between them, right?
what does innoDB and other types of tables mean?
2) types of field
what are differences between text, char(..), varChar(..)?
thanks
1. I read an article on the internet which says:
type of tables must be created as innoDB for generating relationship between them, right?
what does innoDB and other types of tables mean?
2) types of field
what are differences between text, char(..), varChar(..)?
thanks
- Tue Jul 26, 2005 2:17 pm
- Forum: PHP - Code
- Topic: help with \n
- Replies: 12
- Views: 378
- Tue Jul 26, 2005 2:03 pm
- Forum: PHP - Code
- Topic: help with \n
- Replies: 12
- Views: 378
- Tue Jul 26, 2005 1:33 pm
- Forum: PHP - Code
- Topic: help with \n
- Replies: 12
- Views: 378
help with \n
followings are php code, error on line 3 because of the \n. I can not understand that why \t is ok but \n is error? headache for php. (\n is for breaking a new line) if(!$connect||!$selectdb) { $error= "Error: can not connect to database\n";//line 3 $error.="user:\t".$dbuser.&quo...
- Tue Jul 26, 2005 12:00 pm
- Forum: PHP - Code
- Topic: is it possible to post info of 2 forms?
- Replies: 5
- Views: 220
- Tue Jul 26, 2005 11:38 am
- Forum: PHP - Code
- Topic: is it possible to post info of 2 forms?
- Replies: 5
- Views: 220
is it possible to post info of 2 forms?
I have 4 forms on one php file. form 1 contains user name and password of a database. there is no submit button on the form. form 2,3,4 are info of 3 tables of the database. each form contains submit buttons, such as add new, delete, update and read. when I click a button on any form (2,3,4), i.e. R...
- Tue Jul 26, 2005 9:06 am
- Forum: PHP - Code
- Topic: new to cookie: concept
- Replies: 2
- Views: 171
new to cookie: concept
hi all, let me start with netscape as example. when we try to login again in netscape to some place we logined before, netscape can show our user name and password automatically. ok, my questions: 1. does netscape set user name and password as cookie's value? or 2. does netscape use the cookie's val...
- Tue Jul 26, 2005 8:42 am
- Forum: PHP - Code
- Topic: syntax error: how to mix script code with php code
- Replies: 3
- Views: 132
syntax error: how to mix script code with php code
following code has runtime errors, "hid" is a hidden in a form //code $strWho=$_POST['hid'];//php, error also? print('<script language="javascript"> alert("It is read"+$strWho); </script>'); note on line 3: "It is read"+$strWho what is correct code for above p...
- Tue Jul 26, 2005 7:23 am
- Forum: PHP - Code
- Topic: how to identify if a button is pressed?
- Replies: 3
- Views: 641
how to identify if a button is pressed?
assume there are 2 forms (form1 and form2), both forms contain button named "send"; if only one form, it is easy to identify if the button is pressed by code: if(isset($_POST['send']))//works { } but there are 2 buttons with same name in 2 forms, can we identify a button using its parent? ...
- Mon Jul 25, 2005 12:44 pm
- Forum: PHP - Code
- Topic: params use references, pointers in php or script function
- Replies: 1
- Views: 152
params use references, pointers in php or script function
in C++, we can pass references or pointers as function's parameters. i.e. void MyCpp(int&i0,int&i1,int&i2);//references or void MyCpp(int*pi0,int*pi1,int*pi2);//pointers when the function returns, all parameters can be modified by the function's body. ------------------------- my questio...
- Mon Jul 25, 2005 12:31 pm
- Forum: PHP - Code
- Topic: executing process of php file
- Replies: 3
- Views: 186