RE: [PHP-DB] SELECT statement does not return rows

2002-02-01 Thread Shrock, Court
I am assuming that this code is NOT the file "do_mod_job.php". What happens if you do this next line right after you execute your query?: echo 'num rows fetched: '.mysql_num_rows($result).''; also, the while loop shouldn't really be necessary as the query should only return one record if I unde

RE: [PHP-DB] SELECT statement does not return rows

2002-02-01 Thread Shrock, Court
oops.forgot a semicolon on the first line of the multi-line code segment > -Original Message- > $row = mysql_fetch_array($result) > echo 'columnvalue'; > while(list($key, $val) = each($row)) { > // $row has two key/value pairs per column -- one integer, > one string > if (is_

RE: [PHP-DB] Re: Searching Documents

2002-02-08 Thread Shrock, Court
Actually, PHP does COM very wellsearch the PHP-WIN list about "COM" and "Word" and you should find some good hints and examples to get going. I haven't accessed the keywords portion of a word document yet, but someone wrote a spellcheck function that used the spellcheck built into Word using

RE: [PHP-DB] Re: Searching Documents

2002-02-08 Thread Shrock, Court
correct to my knowledge. I am not sure even running ASP on a linux server would allow you to open the word documents, as I think ASP uses COM to do the dirty work. of course, you could always do the world a favor and not use microsoft's proprietary file formats in any way. an open stand

RE: [PHP-DB] Round a float to the next highest value despite the value after the point

2002-02-08 Thread Shrock, Court
http://www.php.net/manual/en/function.ceil.php > -Original Message- > how can I round a float to the next highest value reguardless > of the value > after the point, does anyone have any suggestion, any help would be > apreciated. -- PHP Database Mailing List (http://www.php.net/) To

RE: [PHP-DB] Re: Searching Documents

2002-02-08 Thread Shrock, Court
If "running" meant at the process level and not just installed, then word does not have to be running.COM creates the appropriate instances of whatever is requested via COM. But yes, Word does have to be installed. However, wonder what the wine project could afford this discussion? Maybe yo

RE: [PHP-DB] Security concern with web forms (update of MySQL data base)

2002-03-01 Thread Shrock, Court
A quick suggestion would be to build your query normally and then don't run the query if it has a semicolon that isn't inside quotes. Also, use single quotes in the update to make your checks easier: UPDATE table_name SET field1='value1' -Original Message- From: Ronald Wiplinger To: [EM

RE: [PHP-DB] Number of working hours in a month.

2002-03-02 Thread Shrock, Court
I just ran across this description[1] that points to this link[2]. HAven't tried it personally, and the site requires a login, so you might not find it useful, but just in case. [1]Count how many weeks in the month have a specified day, such as Mon, Tue, etc. Var avail - number of days - first d

RE: [PHP-DB] Re: FW: PHP Question on MySQL grouping

2002-03-05 Thread Shrock, Court
How about changing: if ($a_row[dishtype] != $loop) to // the $loop variable must be unset before the loop starts // though, so put a unset($loop) right before your while if ($a_row[dishtype] != $loop && isset($loop)) Court > -Original Message- > From: Keiran Wynyard [mailto:[EMAIL P

RE: [PHP-DB] multiple select statements

2002-03-05 Thread Shrock, Court
Try creating your input with names that php will create arrays from, then you can simply join the array elements if they are non-empty with something like " OR $key='$val'". An example: When submitted you could then: $clause = ''; if (sizeof($_POST['filter']) > 0) { $clau

RE: [PHP-DB] security

2002-03-05 Thread Shrock, Court
Look for "file_uploads" in the "PHP Core" section of output from phpinfo(). A "1" means that it is enabled. A "0" means that it is disabled. Also, to address: > > i personally think that the developer still has > > the control in making his php code secure. but how do you > > think will this new

RE: [PHP-DB] Time Question

2002-03-05 Thread Shrock, Court
15 minutes = 15 * 60 seconds. Therefore just add 900 to the field. > -Original Message- > From: Lerp [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 05, 2002 11:15 AM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] Time Question > > > Hi there, I have a field in my db called expires and

RE: [PHP-DB] records into an editable box

2002-03-06 Thread Shrock, Court
do you mean something like: \n"; ?> of course, the output above would need to be inside an html form. > -Original Message- > From: jas [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 05, 2002 11:35 PM > To: [EMAIL PROTECTED] > Subject: [PHP-DB] records into an editable box > > > How

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Shrock, Court
I would try to use CSS, instead of complex tables. That way, you only need to store the structural html in the database and the layout is handled by CSS--floating images and flowing text are really easy with CSS. > -Original Message- > From: Monty [mailto:[EMAIL PROTECTED]] > Sent: Thurs

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Shrock, Court
Actually, CSS is very powerful--way more than simple html. One drawback is that CSS1 did not include any support for tables directly, but the generic controls work nicely, there just is no way to say "" in CSS1. A great book that taught me a lot about CSS is http://www.oreilly.com/catalog/css/ -

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Shrock, Court
Valid point--I was thinking that in a news article or such, the content is mostly already created and edited, just needed to be posted by someone not familar with HTML. I like your idea about the [start-stop block]. To maybe merge what Paul said with your idea, you could store the name of the fu

RE: [PHP-DB] Best way to store/retrieve content??

2002-03-07 Thread Shrock, Court
> I like your idea about the [start-stop block]. To maybe > merge what Paul > said with your idea, you could store the name of the function handler > (generates the appropriate content) inside the "[]". I meant Peter :) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, vi

RE: [PHP-DB] Creating an array of mySQL results with PHP

2002-03-11 Thread Shrock, Court
Well, you could use the power of PHP arrays and just name your input fields in such a way that would create an array upon submittal. For example: Then, after submittal, you just loop through the array $log like such: foreach($log as $week_no => $data) { $sql = "UPDATE table SET classroo

RE: [PHP-DB] Creating an array of mySQL results with PHP

2002-03-11 Thread Shrock, Court
'fieldtrip']; $pta = $row['pta']; $mast = $row['mast']; $meetings = $row['meetings']; $other = $row['other']; echo << EOD; } echo "<"; ###SNIP > -Original Message- > From: John Hughes, Jomari Works [mailto:[E

RE: [PHP-DB] Creating an array of mySQL results with PHP

2002-03-12 Thread Shrock, Court
), that would save me the time of re-typing a lot if you feel it would help you. Court > -Original Message- > From: John Hughes [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, March 12, 2002 12:08 AM > To: Shrock, Court; [EMAIL PROTECTED] > Subject: Re: [PHP-DB] Creating an arra

RE: [PHP-DB] textarea and mysql query

2002-03-18 Thread Shrock, Court
You problem lies in the html that you are outputting. For normal html tags, you use the "value" attribute to initialize the default display. For tags, you do not use the "value" attribute; instead, enclose what you want displayed between the openining tag and the closing tag. For example:

RE: [PHP-DB] passing array through $PHP_SELF

2002-03-18 Thread Shrock, Court
Why not write hidden inputs and name them appropriately so that when the form gets submitted again, the array gets created automatically--no implode/explode. then, upon submittal, the array, $_POST['input'], would look like this: Array ( "var1" => "hello" "var2" => "world" ) Please let

RE: [PHP-DB] need some help...

2002-04-02 Thread Shrock, Court
If you want your output to validate xhtml, you had better make sure that your html looks like: Link and NOT: Link > -Original Message- > From: Jonathan Hilgeman [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 02, 2002 4:52 PM > To: '[EMAIL PROTECTED]' > Cc: '[EMAIL PROTECTED]' > Su

RE: [PHP-DB] PHP & MySql

2002-04-02 Thread Shrock, Court
You could store session vars that are set on the NT box in mssql and then pass them to the linux box with the session id in the querystring and then have the linux box verify and fetch the session data from the MSSQL server...problem solved. www.freeTDS.org is where you can get the necessary libs

RE: [PHP-DB] adding troubles revisited

2002-05-21 Thread Shrock, Court
Where do the variables, $first_name and $last_name come from? QueryString or Form submittal? Do you have register_globals=on or have you taken the fact that they are not registered into account? > -Original Message- > From: cin [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 21, 2002 11

RE: [PHP-DB] how to create a graph from a db?

2002-06-04 Thread Shrock, Court
You can also use something like jpgraph (http://www.aditus.nu/jpgraph/)... -Original Message- From: Chris Payne To: [EMAIL PROTECTED] Sent: 6/4/02 10:00 PM Subject: [PHP-DB] how to create a graph from a db? Hi there everyone, I have a db and the last column is id2 – this adds a 1 every

RE: [PHP-DB] Splitting a string and placing the contents into a form pulldown

2002-06-06 Thread Shrock, Court
use explode() by doing something in the gist of: $options = explode('', $line); echo ''.join('', $options).''; -Original Message- From: Chris Payne To: [EMAIL PROTECTED] Sent: 6/6/02 5:25 PM Subject: [PHP-DB] Splitting a string and placing the contents into a form pulldown Hi there ever

RE: [PHP-DB] A real question this time...

2002-07-05 Thread Shrock, Court
You are correct that an assignment between two variable is a copy, and that is exactly what is happening, however, you need to know what $SA is originally--it is a resource pointer in ways...it does not hold any data, it is just an internal pointer to where php is storing the data. So, when you d

[PHP-DB] FYI :: MSSQL and stored procedures

2002-07-08 Thread Shrock, Court
Just throwing this out there in case someone has come across this before and hasn't found a solution: If you are performing a stored procedure inside a loop, it is a good idea to unset the variable that mssql_init returns so that you do NOT bind multiple values to the same stored procedure: fore

RE: [PHP-DB] Select string.

2002-07-10 Thread Shrock, Court
$login = mysql_query("SELECT * FROM Users WHERE Username ='$User_Name'"); > -Original Message- > From: Shiloh Madsen [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, July 10, 2002 4:48 PM > To: php-db > Subject: [PHP-DB] Select string. > > > Yet another thing i need some quick help with.