Re: [PHP-DB] SQL Select?

2001-03-24 Thread CC Zona
In article <99jh2n$gr1$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("Grant") wrote: > Is there any way of using a string in an SQL query instead of using the > table name. Something along the lines of > > $result=mysql_query("SELECT * FROM $tablename",$db); > > this doesnt work it come up with a par

Re: [PHP-DB] SQL Select?

2001-03-24 Thread Andrew Hill
Grant, $link_id = mysql_connect($host, $usr, $pass) or die (mysql_error()); mysql_select_db($database, $link_id); $sql="select fields from $table where criteria = $value"; $result = mysql_query($sql, $link_id) or die ("no results"); //return result set to php you still need to do something wit

[PHP-DB] SQL Select?

2001-03-24 Thread Grant
Hello all Is there any way of using a string in an SQL query instead of using the table name. Something along the lines of $result=mysql_query("SELECT * FROM $tablename",$db); this doesnt work it come up with a parse error thankyou Grant -- PHP Database Mailing List (http://www.php.net/)

Re: [PHP-DB] uploading files.

2001-03-24 Thread boclair
Yes please Tim Morris - Original Message - From: olinux <[EMAIL PROTECTED]> To: PHP-DB <[EMAIL PROTECTED]> Sent: Sunday, March 25, 2001 11:21 AM Subject: Re: [PHP-DB] uploading files. > mmmK, > > i have figured it out, > anyone want it? > lemme know > > olinux > > > - Original Mess

Re: [PHP-DB] uploading files.

2001-03-24 Thread olinux
mmmK, i have figured it out, anyone want it? lemme know olinux - Original Message - From: "olinux" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "PHP-DB" <[EMAIL PROTECTED]> Sent: Saturday, March 24, 2001 4:27 PM Subject: [PHP-DB] uploading files. K, I am using a script i found at

[PHP-DB] uploading files.

2001-03-24 Thread olinux
K, I am using a script i found at hotscripts.com I need it to upload an image to server. I think that my issue is that i need to use the stripslashes(); somewhere, but i don't know where anyways here tis: \n"; return; } ?> and later i calll the function: here the error i receive: Warning

[PHP-DB] mysql privilege

2001-03-24 Thread andrie
Hello php-db, what privileges that i need to do this (privileges for any number): 1 create database 2 Give privilege to any user 3 create user 4 - and what does GRANT and REFERENCE privileges for ? -- Best regards, andrie mailto:[EMAIL PROTECTED] -- P

[PHP-DB] Sybase SQL Anywere - may it work on Win98 with PHP4

2001-03-24 Thread Poison
Hello. Im trying to tune PHP4 and Sybase SQL Anywere under win98. Is this possible? What difference beside Sybase-CT and Sybase in file php.ini? In sql.ini I wrote: [MUSIC] master=NLWNSCK, 192.168.1.44 ,1498 query=NLWNSCK, 192.168.1.44 ,1498 192.168.1.44 this is IP adress in LAN also I try 127

[PHP-DB] RE: [PHP] connection id

2001-03-24 Thread Jonathan Sharp
TIA, What you described is not possible. When you create that connection to the mysql server, that connection dies when the script ends... As far as persistent connections go, you will always call the code to create the connection, but that connection lives on in that apache child process until t

Re: [PHP-DB] connection id

2001-03-24 Thread JJeffman
Use persistent connections it's a matter of performance of your script. When you use persistent connections the next call to mysql_pconnect will catch a opened connection if available. The mysql_connect command always open a new connection which slower than get an opened one. Anyway you can't use

Re: [PHP-DB] read fils

2001-03-24 Thread CC Zona
In article <004101c0b44b$b8e90640$[EMAIL PROTECTED]>, [EMAIL PROTECTED] ("[EMAIL PROTECTED]") wrote: > I just want to read a txt file and let the output in php file. > > Can someone help me? For more sophisticated alternatives, see . -- CC --

[PHP-DB] mysql grant problem?

2001-03-24 Thread Fai
When we use grant as following: GRANT select(col_name_1) on db_name_1.tbl_name_1 to peter identified by "peter"; Then peter can only select the field of col_name_1 on the tbl_name_1 of db_name_1. However, when peter issue the query: DESC tbl_name_1; he can see all the structure of that table. Th

[PHP-DB] re-using arrays

2001-03-24 Thread olinux
I would like to have my table of results sortable by various fields. Similar to www.mysimon.com Would it be faster for me to re-use an array rather than connecting to the DB again, select the same info, and send it again? If so how would you go about this? I would think that you could store t

Re: [PHP-DB] comparison table script

2001-03-24 Thread JJeffman
Remember it only works on PHP4.0 ! HTH. Jayme. -Mensagem Original- De: olinux <[EMAIL PROTECTED]> Para: PHP-DB <[EMAIL PROTECTED]> Enviada em: sexta-feira, 23 de março de 2001 23:38 Assunto: Re: [PHP-DB] comparison table script > Cool! > Just came across this, looks like PHP will make

Re: [PHP-DB] file name extentions

2001-03-24 Thread JJeffman
Look for "AddType application/x-httpd-php4" on your Apache configuration file and add the types you want PHP4 be responsible for. Here are my own : AddType application/x-httpd-php4 .php AddType application/x-httpd-php4 .php3 AddType application/x-httpd-php4 .html HTH Jayme. -M

Re: [PHP-DB] Tree structures...

2001-03-24 Thread Miles Thompson
Joe Celko wrote a book called "SQL for Smarties" that has about 20 pages devoted to representation of trees in SQL. I believe he also has a website. His quick take on representing trees in SQL is that hierarchical databases do this far better and a RECURSIVE UNION funtion is needed to do this

Re: [PHP-DB] file name extentions

2001-03-24 Thread Felix Kronlage
On Sat, Mar 24, 2001 at 12:40:48PM +0100, Dan Eskildsen wrote: > I have tired using the filenmae file.php but the server will not execute the > file. This depends on the configuration of the webserver. The webserver needs to be told which file-suffixes should be used to identify files to parse.

Re: [PHP-DB] How to sort numerically ?

2001-03-24 Thread Laercio Fortes
Dear Sunil, First of all make an array of you are reading from file. Like that: "); } ?> Sunil Jagarlamudi wrote: > I am trying to read a file which has two columns with names and numbers and > I am trying to sort them numerically, with the > highest at the top. Is there anyway you can do tha

[PHP-DB] file name extentions

2001-03-24 Thread Dan Eskildsen
Hi there, Currently my ISP has PHP 3 installed and to run php scripts I have to save the file as name.php3 I expect to install my own server and php4 in the foreseeable future - how can I save the files as .php so that they are upwardly compatible? I have tired using the filenmae file.php but t

[PHP-DB] Tree structures...

2001-03-24 Thread phobo
What's the best way to deal with tree structures? Use the following setup in a database as an example: ID | Parent | Description 1 || Colours 2 |1 | Red 3 || Hello 4 |1 | Green 5 | 4 | Light 6 | 4 | Dark This should be repre

[PHP-DB] read fils

2001-03-24 Thread [EMAIL PROTECTED]
Hello, I just want to read a txt file and let the output in php file. Can someone help me? Walter Franssen