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

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 '[',$aRow['s

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: Subject: [PHP-DB] Question regarding how-to stop the form inputting empty data at end of the form that i

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 Santa
В сообщении от Среда 12 Январь 2005 04:52 Mike Millner написал(a): > 243 Query INSERT INTO tape_tracking_test > (media_id,retention,out_date,return_date,box_id) values > ('','7WK=%s','2005-01-11','2005-3-01','006455C5092800') > > > How can I get PHP to ignore that line that has empty data in

Re: [PHP-DB] MySQLi connection character set problem

2005-01-11 Thread Jean-Philippe Côté
Thanks, this is exactly what I needed. It seems I got tricked by what I expected the mysqli_character_set_name function to do. It seems this function only "returns the DEFAULT character set for the database connection" (quoted from manual) and not the actual character set defined. For example,

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

2005-01-11 Thread Seona Bellamy
Hi guys, I'm relatively new to php, and am pretty much trying to learn as I go along. I've been struggling to get my head around this problem for a day and half, so I'm hoping that someone with more familiarity with the language can help me. I have the following two tables: CATEGORY - I

RE: [PHP-DB] opendir() gives failed to open dir: No error in C:\Apache\Apache\ht

2005-01-11 Thread Bastien Koert
Who is the dir accessable to? the IWAM_USER account? Bastien From: satya narayana <[EMAIL PROTECTED]> To: php-db@lists.php.net Subject: [PHP-DB] opendir() gives failed to open dir: No error in C:\Apache\Apache\htdocs\sample_php.php Date: Tue, 11 Jan 2005 07:26:58 -0800 (PST) Hi All, I am using a

Re: [PHP-DB] ssh tunneling with phpmyadmin

2005-01-11 Thread Martin Norland
Graham Anderson wrote: Wow that actually worked :) and was quite easy...too easy ! now even the relational features work installed on my local laptop one last question on this matter... is there an automatic script you can run that gives the password too... something I can put in my startup items ?

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

2005-01-11 Thread Rich Hutchins
If I understand your original question properly, you want to have an address field that a user can see sometimes and not others? Why not add a single column to your user table, something like see_address and make it hold the results of a yes or no checkbox that only you can see on a user's profile

Re: [PHP-DB] ssh tunneling with phpmyadmin

2005-01-11 Thread Graham Anderson
Wow that actually worked :) and was quite easy...too easy ! now even the relational features work installed on my local laptop one last question on this matter... is there an automatic script you can run that gives the password too... something I can put in my startup items ? many many thanks g On

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 PROTE

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 . FROM 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 logins fro every user UPDATE will not work for

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 cla

[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 erro