Hello,
I just want to read a txt file and let the output in php file.
Can someone help me?
Walter Franssen
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
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
Dear Sunil,
First of all make an array of you are reading from file.
Like that:
?
$sel = "Selcect fild1,fild2 from myfile";
$res= mysql_query($sel);
while ($row=mysql_fetch_row($res))
{
$my_array[$row[0]] = $row[1];
}
// tem:
asort($my_array);
for(reset($my_array); $ind=key($my_array);
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.
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
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.
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 maro de 2001 23:38
Assunto: Re: [PHP-DB] comparison table script
Cool!
Just came across this, looks like PHP will make life
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.
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?
?php readfile("myfile.txt"); ?
For more sophisticated alternatives, see
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:
?
function do_upload($filename,$newname) {
$file = basename($filename);
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
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
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 Message -
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/)
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
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 parse
17 matches
Mail list logo