RE: [PHP-DB] easy db question

2001-04-02 Thread Oson, Chris M.
joseph, This was a feature that was recently modified. Older versions of mySQL support the feature that you seem to want. 3.23.xx and above will support the feature that you have just described. If you want to roll your own out, you could do something like... mysql SELECT

RE: [PHP-DB] Confuse w/ count function?

2001-03-30 Thread Oson, Chris M.
try: $strSQL = "SELECT COUNT(*) AS 'ItemCount' FROM my_table"; $result = mysql_query($strSQL, $db); list($numberOfItems) = mysql_fetch_array($result); echo "The number of items in the database is: $numberOfItems\n"; hTH -Original Message- From: Naga Sean [mailto:[EMAIL PROTECTED]]

RE: [PHP-DB] How to eliminate bad fields from a mysql query?

2001-03-30 Thread Oson, Chris M.
Bob, Don't know if this is what you're looking for, but you *could* do something like: $noData = true; $strSQL = "SELECT field1, field2, field3 FROM table "; $results = mysql_query($strSQL, $db) or $noData = false; if ($noData) { print "TABLE"; while (list($field1, $field2,

RE: [PHP-DB] PHP how to compare?

2001-03-14 Thread Oson, Chris M.
Duky, Have you tried to use: if ($PASS == $PASSNOG) { # do whatever. } If you're taking data from a form, you might want to do a trim to remove any trailing spaces if ($PASS == trim($PASSNOG)) { # do whatever } There's also...

[PHP-DB] Too many includes?

2001-03-08 Thread Oson, Chris M.
Good Day All, I have my scripts in place and the website is running fine. When there's a surge in traffic, the pages take longer being served up. No big news there, I would expect that. My question is, several of my scripts have: require("file.php"); spread out all over the place. As a