[PHP-DB] opendir() gives failed to open dir: No error in C:\Apache\Apache\htdocs\sample_php.php

2005-01-11 Thread satya narayana
Hi All, I am using a simple opendir() function in my code as below. $o = opendir ($dir) or error (cannot open directory: $dir); and the code fails saying opendir(tests): failed to open dir: No error in C:\Apache\Apache\htdocs\sample_php.php. Don't know why the code I am getting the above

Re: [PHP-DB] Update multiple records

2005-01-11 Thread Stuart Felenstein
--- Jochem Maas [EMAIL PROTECTED] wrote: if (count($inds) 0 AND is_array($inds)) { $ind = '.implode(',', $inds).'; } looks like you want to do a select statement with $ind in the form of SELECT * FROM yourtable WHERE yourfield IN ($inds) Adding the IN clause did not help in

Re: [PHP-DB] Complicated Question (maybe)?

2005-01-11 Thread Frank M Flynn
Turning off 'Update' privileges in the DB will work but it's ugly. REVOKE UPDATE ON your table.column - or - * for all FROM the web user http://dev.mysql.com/doc/mysql/en/GRANT.html for documentation Now when someone tries to update this they will get an error and unless you have different

Re: [PHP-DB] Update multiple records

2005-01-11 Thread Martin Norland
Stumbling across some posts online, I noticed [some of] my messages were being sent as evil ugly HTML - so I'm going to do my best to post from Thunderbird for the list. Gotta keep OE configured as is for all the lovely meeting scheduling. Stuart Felenstein wrote: --- Jochem Maas [EMAIL

RE: [PHP-DB] Question regarding how-to stop the form inputting empty data at end

2005-01-11 Thread Bastien Koert
if the media_ID field is an autonumber, then there is no need to do anything with it...mysql will take the null and generate the next id. bastien From: Mike Millner [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] Question regarding how-to stop the form inputting empty data at end

Re: [PHP-DB] Trying to figure out the best way to get and output data

2005-01-11 Thread Chris
It can be done in one query. Just join the two tables, and do a single loop through that query, printing out each row. When you reach a new category, display it. Something like this: $iCategoryID = -1; while($aRow = ...) { if($iCategoryID != $aRow['iCategoryID']) { echo

Re: [PHP-DB] Question regarding how-to stop the form inputting empty data at end of the form that is empty due to a carriage return

2005-01-11 Thread Rory McKinley
Mike Millner wrote: Hello everyone, I have this form that we use for keeping track of tapes we send off site for storage where I work. The form works almost perfectly with the help of a few people. We use a scanner to input the tape id's. The scanner automatically puts a carriage return at the