[PHP-DB] Optimize Tables

2004-05-03 Thread Ng Hwee Hwee
Hi, Is there a way to create a schedule to optimise my MySQL tables automatically? The overhead of some of my tables can reach 355,548 bytes over 3 working days! Please help me! Thanks. Hwee

RE: [PHP-DB] - Delete records in an Access DB

2004-05-03 Thread Uzi Klein
[EMAIL PROTECTED] wrote : Fatal error: Call to undefined function: open() in D:\Inetpub\webs\metagenonlinecom\canc.php on line 11 I assume the error is match case in open function... Should be $db-Open... etc. -Original Message- From: Michael Forbes [mailto:[EMAIL PROTECTED]

[PHP-DB] Re: The usual problem

2004-05-03 Thread Michael Forbes
If your ID is an autoincremented field, try not including it in your insert statement. I.E.: $sql = INSERT INTO underskrifter (type, navn, epost, tid, ip, domain, sted) . VALUES ('$_POST[type]', '$_POST[navn]', '$_POST[epost]', '$tid', '$ip', '$host', '$_POST[sted]' ); -Mike Forbes

Re: [PHP-DB] diference between == and ===

2004-05-03 Thread John W. Holmes
From: Bruno Braga [EMAIL PROTECTED] == means equality and what does the === means ?! It matches the variable type, too. $a = 1; if($a == '1') = TRUE if($a === '1') = FALSE Most often used for function that can return a number including zero and FALSE. If you're expecting a number to be

[PHP-DB] Re: Subject: diference between == and ===

2004-05-03 Thread Neil Smith [MVP, Digital media]
The PHP manual (a useful read btw !) states that === tests for equality and *exact* equivalence, that is: If you test for ==='1' then $var must be a string for the result to be true if you test for ===1 then $var must be an integer or double type for the result to be true Usually its used in

Re: [PHP-DB] RE: [tcphp] Hella fun project I'm about to throw at some tech col lege students

2004-05-03 Thread David T-G
Rafi -- ...and then Rafi Sheikh said... % % Hi List. A quick question. I have some categories that are really long % and I would like to re-word or re-format them when I am bring data in from a % DB. Now which would be better: Can you describe an algorithm for doing so? Your example

[PHP-DB] Re: SQL question!

2004-05-03 Thread Michael Forbes
What you wrote will give you the list of users who also happen to have comments. What you really want is more like this: SELECT Users.ID, Users.UserName, Comments.Description FROM Users LEFT JOIN Comments ON Users.ID = Comments.UserID; (note that you'll need to have the UserID foreign key in

Re: [PHP-DB] - Delete records in an Access DB

2004-05-03 Thread Michael Forbes
Heh, yeah, I didn't read far enough-- and boy do I feel like a troll now. My apologies, case inconsistencies probably are causing his problem-- but he'll also have a problem with the SQL statement when it gets that far, if he doesn't tell it what to delete (i.e., wildcard), simply b/c that's

Re: [PHP-DB] SQL question!

2004-05-03 Thread Larry E . Ullman
I have these tables. Users ( id,name,etc ) Coments : ( id , comment ) How do I do this kind of query: I thought in one thing like this but I cant figure it out. Example: Select * from users order by id desc in (select count (id) from comments) Expected result: List of users: * User1 See

[PHP-DB] SQL question!

2004-05-03 Thread Bruno Braga
Hey. I have these tables. Users ( id,name,etc ) Coments : ( id , comment ) How do I do this kind of query: I thought in one thing like this but I cant figure it out. Example: Select * from users order by id desc in (select count (id) from comments) Expected result:

Re: [PHP-DB] Optimize Tables

2004-05-03 Thread Ng Hwee Hwee
Thanx for this enlightening insight about cron jobs... just a question.. when i run Optimize.php, i realise that you will echo some statements. where will these statements be shown? since you put /dev/null instead of/dev/null 21 , does it mean that your echo statements will be reflected