[PHP-DB] php linux + micorsoft sql server

2002-02-06 Thread ip
Whatever the way I compile apache or freetds or php the error message is still the same Call to undefined function : sybase_connect (the same for mssql_connect) -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-DB] Re: Counting db generate links

2002-02-06 Thread Adam Royle
You use a link management system. You can find examples of these all around the web, but I know you can get some at http://www.hotscripts.com They are also probably more complex and flexible than what i describe below. Basically what it does (you could even write it yourself) is this: 1. All

[PHP-DB] Re: Image Operations with MySQL

2002-02-06 Thread Leendert Brouwer
http://www.phpbuilder.com/columns/florian19991014.php3 Tim Lan [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Hi, I want to save and load images as binaries with a MySQL database, but I'm not sure how to do it. I'm sure this is a very dumb question, but

[PHP-DB] Re: FIle Uploading to database

2002-02-06 Thread Leendert Brouwer
Todd Williamsen [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Well... thanks to Dan Burner for the script... BUT I cannot get this friggin INSERT statement to execute.. which craps out.. Specific error messages might help more. Use mysql_error() with

[PHP-DB] cutting off zeros 10.00 to 10

2002-02-06 Thread Thomas Murphy
Hallo, i was wondering if there is a built-in function in php that just cuts off not needed zeros from float-numbers (like changing 1.90 to 1.9 or 10.00 to 10). I get this numbers from a mysql-database, perhaps there even is a mysql-function for this??? thank you very much, Thomas Murphy --

Re: [PHP-DB] cutting off zeros 10.00 to 10

2002-02-06 Thread Mike Maltese
I tested this and it seems to work: $n = 1.90; for($i=strlen($n);$i0;$i--){ if(substr($n,$i,1) == 0){ $n = substr($n,0,(strlen($n))-1); }else{ break; } } No charge...this time. =) Regards, Mike - Original Message - From: Thomas Murphy [EMAIL PROTECTED] To:

Re: [PHP-DB] cutting off zeros 10.00 to 10

2002-02-06 Thread Thomas Murphy
Hello Mike, Mike Maltese wrote: I tested this and it seems to work: $n = 1.90; for($i=strlen($n);$i0;$i--){ if(substr($n,$i,1) == 0){ $n = substr($n,0,(strlen($n))-1); }else{ break; } } No charge...this time. =) thank you very much. :) bye, Thomas

Re: [PHP-DB] cutting off zeros 10.00 to 10

2002-02-06 Thread Thomas Murphy
i still have some problems on typecasting my float-variable to a string variable. i used something like this: $n = $row[Points]; settype($n,string); but the zeros are still there - as if $n is still handled as a float number not a string. with $n = 1.90 it's converted to 1.9 without problems...

Re: [PHP-DB] sybase or SQL Server

2002-02-06 Thread William Fong
You need to enable the MSSQL modules in php.ini or when you compile PHP. -- William Fong - [EMAIL PROTECTED] Phone: 626.968.6424 x210 | Fax: 626.968.6877 Wireless #: 805.490.7732| Wireless E-mail: [EMAIL PROTECTED] - Original Message - From: ip [EMAIL PROTECTED] To: [EMAIL

[PHP-DB] Updating Database problem...

2002-02-06 Thread jas
I am having a problem with a script that simply updates a few fields in a database however, I am having a problem having the script to not update the database fields if the form is invalid... Here is my script, I don't want you to fix it for me unless you show me where I am going wrong or can

RE: [PHP-DB] Updating Database problem...

2002-02-06 Thread Rick Emery
Jas, Why are you initiating an UPDATE command when you've not changed the information you wish to update? For instance, if $c_name is blank, you display a message to enter the data; yet, you DO NOT ASK the user to enter the correct information. Then, you do an UPDATE statment to enter that

[PHP-DB] Is this possible?

2002-02-06 Thread Raymond Lilleodegard
Hi! I have this tricky case, at lest for me : ) I'm trying to get some data out of two tables and listing the data in a product/price site. But. : I have one table with productinfo and one with prices. And it is several columns with the same id in the pricetable, because every product have

RE: [PHP-DB] Is this possible?

2002-02-06 Thread Rick Emery
Yes, you can do that easily. It is easier to answer your question if you show us your table structure. -Original Message- From: Raymond Lilleodegard [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 11:16 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] Is this possible? Hi! I

Re: [PHP-DB] Updating Database problem...

2002-02-06 Thread jas
Sorry, but I figured it out. You were right, I do need to call the sql update function after the error field returns a 0. Here is the code if any one else out there is having the same problem. ?php # trim extra spaces from these variables $c_name = trim($c_name); $s_addy = trim($s_addy); $city

Re: [PHP-DB] Is this possible?

2002-02-06 Thread Raymond Lilleødegård
My table look like this: Pricetable: (varetabell) (varenr, type, pris) VALUES (1, '6inch', 29), (1, '6inch meny', 51), (1, 'footlong', 45), (1, 'footlong meny', 66), (1, 'salat', 39), (1, 'salat meny', 51), (2, '6inch', 49), (2, '6inch meny', 69), (2, 'footlong', 75), (2,

Re: [PHP-DB] Is this possible?

2002-02-06 Thread DL Neil
Hi Raymond, I have this tricky case, at lest for me : ) I'm trying to get some data out of two tables and listing the data in a product/price site. But. : I have one table with productinfo and one with prices. And it is several columns with the same id in the pricetable, because every

Re: [PHP-DB] Updating Database problem...

2002-02-06 Thread William Fong
What is the error? We have no idea what to look for if you don't tell us what error you are receiving. Have you (like someone else has suggested earlier) printed the SQL statement? I would add: print( '!-- SQL Statement: $sql --' ); in your code after you build the statement. In your SQL

[PHP-DB] Search results

2002-02-06 Thread Todd Williamsen
I have done a search page based on a specific column name, but in some columns there is no results to be returned.. What I would like to do is display an error message stating that there is no results .. something like Sorry your search returned Zero Rows

Re: [PHP-DB] Is this possible?

2002-02-06 Thread Hugh Bothwell
It looks to me like you should be dividing the data differently; something like (quantity, item, option, price) VALUES (1, '6inch', '', '29), (1, '6inch', 'meny', 51), (1, 'footlong', '', 45), (1, 'footlong', 'meny', 66), and so forth... Raymond lilleødegård [EMAIL PROTECTED] wrote in message

[PHP-DB] mail options

2002-02-06 Thread CrossWalkCentral
Can any one tell me what the value of using this statement. mail($email, $subject, $message, From: $from\nX-Mailer: PHP/ . phpversion()); vs this statement mail($recipient, $subject, $msg, $mailheaders); considering all variables are defind in the script

Re: [PHP-DB] Is this possible?

2002-02-06 Thread DL Neil
Raymond, See complaint elsewhere as a result of cross-posting. Add my criticism because I'm on both lists and keep them in separate InBox folders and now feeling schizoid... SELECT * [whatever] FROM pristabell P, varetabell V1, varetabell V2 WHERE P.varenr = V1.varenr AND P.varenr = V2.varenr

RE: [PHP-DB] Is this possible?

2002-02-06 Thread Rick Emery
SELECT * FROM pristabell LEFT JOIN varetabell USING(varenr) WHERE pristabell.varenr=$item This statement will get all prices and quantities fro a given item ($item). Simply interate through the recordset and display the info in whatever format you wish. -Original Message- From: Raymond

[PHP-DB] Re: Simple Search Function

2002-02-06 Thread Lerp
Hi there, you might want to take a look at the eregi function for case-insensitive pattern matching. Joe :) Mike De Libero [EMAIL PROTECTED] wrote in message 001f01c1af1c$4d7dce00$6901a8c0@slugo">news:001f01c1af1c$4d7dce00$6901a8c0@slugo... Hi guys, I was wondering what the best way would

Re: [PHP-DB] Search results

2002-02-06 Thread Jason Wong
On Thursday 07 February 2002 02:16, Todd Williamsen wrote: I have done a search page based on a specific column name, but in some columns there is no results to be returned.. What I would like to do is display an error message stating that there is no results .. something like Sorry your

Re: [PHP-DB] Is this possible?

2002-02-06 Thread William Fong
I was thinking something similar, but I couldn't figure out what it meant (was it in German?). Why would you need quantity as a field? If buying two, you get a 10% discount, why not put that in a formula? Would make it a little more dynamic. Without knowing all the information: (id,

[PHP-DB] Storing the Database Password

2002-02-06 Thread Tim Haak
Hello, I am wondering what methods you all have come up with for storing your database password. In the past, I have just been putting all of the DB connection information in an included file. Although the idea of the DB password sitting on the server in plain text makes me feel uneasy. Any

Re: [PHP-DB] Search results

2002-02-06 Thread Jason Wong
On Wed, 6 Feb 2002, Todd Williamsen wrote: that doesn't work Bit terse? What do you get? Error? Nothing? -- Jason Wong -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Search results

2002-02-06 Thread Jason Wong
On Wed, 6 Feb 2002, Todd Williamsen wrote: Please keep discussion on the list. Doesn't execute the $msg variable. And it doesn't return any results: Have you checked that your query does indeed return results? I tried this: ? if ($result == 0) { echo $msg; } else { echo

RE: [PHP-DB] Search results

2002-02-06 Thread Rick Emery
CHANGE: ? if ($Industry != ) { echo $msg; } else { echo $contact_list; } ? TO: if( mysql_num_rows($result) 0 ) { echo $contact_list; } else { echo $msg; } -Original Message- From: Todd Williamsen [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 12:17 PM To: [EMAIL

[PHP-DB] RE: Search results

2002-02-06 Thread Andrew Chase
You can use mysql_result_rows() to check whether any rows were returned; something like: ? if(mysql_result_rows($result) 0){ while ($row = mysql_fetch_array($result)) { //Do stuff with result rows here } }else{ echo Sorry your search returned Zero

Re: [PHP-DB] RE: Search results

2002-02-06 Thread Chris Boget
You can use mysql_result_rows() to check whether any rows were returned; something like: you mean: mysql_num_rows(); ? Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] RE: Search results

2002-02-06 Thread Andrew Chase
Yes, sorry about that. :P I need to eat lunch now. -Andy -Original Message- From: Chris Boget Subject: Re: [PHP-DB] RE: Search results you mean: mysql_num_rows(); -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP-DB] Re: Simple Search Function

2002-02-06 Thread Rick Emery
Mike is using MYSQL's REGEX; he's looking for a case-insensitive MYSQL function function similar to PHP's eregi(). -Original Message- From: Lerp [mailto:[EMAIL PROTECTED]] Sent: Wednesday, February 06, 2002 1:26 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] Re: Simple Search Function Hi

Re: [PHP-DB] if variable is equal to 2 through 4

2002-02-06 Thread Chris Boget
how would I write it if I wanted to say this: if $variable == 2 through 4 ??? if(( $variable = 2 ) ( $variable = 4 )) { echo Equals 2 through 4br\n; } Chris -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] if variable is equal to 2 through 4

2002-02-06 Thread Mihail Bota
try this: if ($v=2 $v=4) { echo ...; } mihai On Wed, 6 Feb 2002, Jay Fitzgerald wrote: i am currently using this code: if ($variable == 2) || ($variable == 3) || ($variable == 4) { echo hello; } how would I write it if I wanted to say this: if $variable == 2 through 4 ???

[PHP-DB] Re: [PHP] if variable is equal to 2 through 4

2002-02-06 Thread Erik Price
On Wednesday, February 6, 2002, at 04:10 PM, Jay Fitzgerald wrote: i am currently using this code: if ($variable == 2) || ($variable == 3) || ($variable == 4) { echo hello; } how would I write it if I wanted to say this: if $variable == 2 through 4 ??? if ($variable = 2) ($variable

[Fwd: Re: [PHP-DB] if variable is equal to 2 through 4]

2002-02-06 Thread Indioblanco
$my_array = array (2, 3, 4); if (in_array($variable, $my_array)) { echo hello; } Jay Fitzgerald wrote: i am currently using this code: if ($variable == 2) || ($variable == 3) || ($variable == 4) { echo hello; } how would I write it if I wanted to say this: if $variable

RE: [PHP-DB] if variable is equal to 2 through 4

2002-02-06 Thread Gurhan Ozen
if ( ($variable 1 ) ($variable 5) ) echo hello; or alternatively, for ($i=2; $i 5; $i++) { if ($variable=$i) echo hello; } Gurhan Ozen MCI WorldCom Quality Assurance Team [EMAIL PROTECTED] ph: 703-449-4754 Vnet: 228-4754 1-800-PAGE-MCI pin: 1927052 AIM:

[PHP-DB] list archive

2002-02-06 Thread B.J.Rumsey
Is there a list achrive somewhere?

Re: [PHP-DB] list archive

2002-02-06 Thread Steven Cayford
On 2002.02.06 19:47:12 -0600 B.J.Rumsey wrote: Is there a list achrive somewhere? Go here http://www.php.net/mailing-lists.php and click on the archive for the list you want. -Steve -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] help files...

2002-02-06 Thread Miles Thompson
Google search for php wiki, or save that step and go to http://sourceforge.net/projects/phpwiki/ Miles Thompson At 05:26 AM 2/6/2002 -0700, jas wrote: Is there anyone out there that has developed an application using php and mysql that allows clients etc to update and maintain their own

Re: [PHP-DB] new php developer

2002-02-06 Thread Jason G.
Hi, At 12:17 AM 2/7/2002 -0500, John George wrote: I am a student a the University of Pittsburgh, and a new php developer. Is it possible to have a mysql database that is made up of html documents that can be accessed using php? This question may sound strange, but I'm not sure of any other