[PHP-DB] Fetch two mysql resource in while loop

2004-06-16 Thread sam
le($row1=mysql_fetch_row($result1)){ $row2=mysql_fetch_row($result2) ...} there will be no problem and both $row1 and $row2 contain values. can anyone tell me why? is it i worte something wrong? sam -- PHP Database Mailing Li

[PHP-DB] Re: delete a record not working

2004-06-17 Thread sam
hi, if the column type of id is varchar or char, u need to put '' around id. ur query should look like mysql_query("DELETE FROM open_trades WHERE id= '".$id."'"); Note that your can leave any space between " and ' if u do have a space between them, ur query will look like mysql_query("DELETE FRO

[PHP-DB] Re: delete a record not working

2004-06-17 Thread sam
hi, if the column type of id is varchar or char, u need to put '' around id. ur query should look like mysql_query("DELETE FROM open_trades WHERE id= '".$id."'"); Note that your can leave any space between " and ' if u do have a space between them, ur query will look like mysql_query("DELETE FRO

Re: [PHP-DB] Dropdown menus from DB query

2004-06-18 Thread sam
hello. for my self, i hate to use \" beucase it gets me confuse all the time. my verison is echo " value ='" .$array['code']."'>.$array['name'].""; btw, you have a extra > at the end of your code. >echo " value=\"".$array["code"]."\">".$array["name"]."";> &

[PHP-DB] Separating paragraphs in mySQL?

2001-04-09 Thread sam
Hello, I have this field filled up from within a text area. Something the same as that on message boards but something that has more characters in it. I have it set to get up to 1500 characters. My main problem is that although I tried inserting separate paragraphs (by pressing the return/enter

[PHP-DB] Error with in_use() from Beginning PHP4 book.

2001-08-25 Thread sam
eady in use. The whole register.php page it was used is from PAGE 468 to 472. Am I missing something here? Does this have anything to do with updated MySQL parser? I am now using MySQL version 3.23.36. Can anyone help me get around this one. I really need help on this due to time constraints. :)

[PHP-DB] Error with in_use() from Beginning PHP4 book.

2001-08-25 Thread sam
y need help on this due to time constraints. :) Please help!!! thanks a lot. Sam Netfuze Hypermedia Designs -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

RE: [PHP-DB] Simple Addition Form

2001-01-19 Thread Sam Masiello
Since you want your totaling calculation to be done on the client side, you would need to use a client side scripting language like Javascript to do this for you. PHP is server side and can't do the dynamic form updates that you are referring to. HTH Sam Masiello Systems Analyst Chek.Com

Re: [PHP-DB] Update data problem

2004-06-23 Thread Sam Chill
$E= "$C*$G"; Should be: $E = $C * $G; Never use quotation marks when doing math. Quotation marks are used for strings. Hope that helps. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] Update data problem

2004-06-23 Thread Sam Chill
Justin, Is the code you posted all of the code or just a small snippet? You don't appear to be setting $C or $G. Could you post a larger code dump please? -Sam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] return array

2004-06-25 Thread Sam Chill
Instead of return $field[]; try return $field; -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] How to find out the number of rows in a table?

2002-01-24 Thread Sam Masiello
Try the following: $sql = "select count(*) as c from your_table" ; $result = mysql_query(your_db, $sql, your_connection_identifier) ; $row_count = mysql_result($result, 0, 'c') ; Now $row_count contains the number of rows in your table named "your_table" HTH -

Re: [PHP-DB] Required pages...

2002-02-12 Thread Sam Masiello
ut it is a pretty easy, convenient way to require authentication. HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 X289 [EMAIL PROTECTED] - Original Message - From: "Rick Emery" <[EMAIL PROTECTED]> To: "'jas'" <[EMAIL PROTECT

Re: [PHP-DB] Fatal Error using mysql_connect()

2002-03-12 Thread Sam Masiello
Looks like MySQL support was not compiled into PHP. If you are using a linux based system you need to run the configure script with the --with-mysql flag in order to utilize the MySQL function set. HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 X289 [EMAIL

RE: [PHP-DB] Connection error

2002-04-19 Thread Sam Masiello
Instead of suppressing the error message using the @ sign, why not remove it and your die() statement and see what error is produced on your live server? HTH --Sam -Original Message- From: Ciprian Trofin [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 6:29 AM To: [EMAIL

RE: [PHP-DB] Multiple Entry

2001-08-01 Thread Sam Masiello
ur table in its current form, you will get one row, but there will be no way to associate it with the proper machine name. HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 x289 [EMAIL PROTECTED] -Original Message- From: Sharif Islam [mailto:[EMAIL PROTECTED]] Se

RE: [PHP-DB] PHP IRC channel?

2001-08-16 Thread Sam Masiello
On efnet, you can go to #php HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 x289 [EMAIL PROTECTED] -Original Message- From: Brian Tegtmeier [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 16, 2001 12:15 PM To: [EMAIL PROTECTED] Subject

RE: [PHP-DB] mail ()

2001-09-17 Thread Sam Masiello
I think you might want to be a little more specific as to what you are trying to accomplish. Give us some more details and we would be glad to help you out! HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 X289 [EMAIL PROTECTED] -Original Message- From

RE: [PHP-DB] Stupid question=p

2001-09-17 Thread Sam Masiello
n the database. When you pull it out of the database, you can use the unserialize() function to turn it back into an array. See http://www.php.net/serialize for more information. HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 X289 [EMAIL PROTECTED] -Original Me

Re: [PHP-DB] grabbing id from new record

2002-01-14 Thread Sam Masiello
are using MySQL. There is a function called mysql_insert_id() that will give you the answer that you are looking for. You can find more information about it here: http://www.php.net/manual/en/function.mysql-insert-id.php HTH Sam Masiello Software Quality Assurance Engineer Synacor (716) 853-1362 X

[PHP-DB] Tricky Database Question

2003-07-17 Thread Sam Richardson
etc) or do I somehow store all the data in one table (text for all the entries, although I may be storing short numbers, short descriptions, large amounts of text and abstracted radio buttons). The development platform is PHP with either MySQL or Postgres as needed. -- Sam Richardson - Web Develo

Re: [PHP-DB] variable and MySQL

2005-03-16 Thread Sam Street
Mark Cain wrote: I think I understand your question. Perhaps what you want is not a variable variable -- but a variable (determined from the context). Variables always vary depending on the situation as opposed to a constant which - uhh -- stays constant. Combine the variable and the constant in

[PHP-DB] foreach problem

2003-02-07 Thread Sam Folk-Williams
se query."); } $event_date is an array with several dates separated by commas. (2003-10-02, 2003-10-03). The code above successfuly inserts the first dae in the array, but none of the others... am I missing something? Thank you. Sam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] foreach problem

2003-02-07 Thread Sam Folk-Williams
same code to insert checkbox data in a different form, so... I'm kinda stumped. Sam "Jason Wong" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > On Friday 07 February 2003 11:22, Sam Folk-Williams wrote: > > Hi, >

[PHP-DB] printing repeat table headers

2003-02-15 Thread Sam Folk-Williams
e those headers repeat every 33 rows, so that as the user scrolls down that can still see the table headers every so often. I feel like this should be easy, but it's giving me a hard time. Any suggestions? My code is below. Thanks, Sam $tableHeaders = " Staff Name Office Locat

[PHP-DB] displaying query results

2003-02-18 Thread Sam Folk-Williams
echo "$job_cat_name$staff_fname $staff_lname$staff_desc"; } } //close while loop echo ""; Thanks, Sam -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] un-encrypting passwords

2003-07-28 Thread Sam Folk-Williams
ssible to un-encrypt them. I want to add a feature that allows users to request to have their password emailed to them. Can anyone recommend a better method for encypting passwords and how to unencrypt? (is there a function in PHP for this? Or a different MySQL function?) Thanks, Sam -- Sam Folk-W

Re: [PHP-DB] un-encrypting passwords

2003-07-28 Thread Sam Folk-Williams
Thank you! These are some great ideas. Sam "Brad Bonkoski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Typically in these systems you do not send them their password un-encrypted if > they lose it because like you said, it is one way. Normally, you collect