On 10 Apr 2001, at 13:49, Rob Griffiths wrote:
> **50** print "{$A["fname"]}" .
>"{$A["lname"]}" . "
>{$A["dept"]}" . " {$A["manager"]}" .
>"{$A["extension"]}\n";
Notation with "{" parenthesis is not used in PHP3. Use the string
concatenatio
Hello, i have some problems with date's in a query like
SELECT * FROM news WHERE fdate >= $date AND tdate >= #date
Can someone help me
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact t
i'm pretty sure i read somewhere that is you use sessions php will not allow
an url that contains a path to a file typed in the address bar ...
may be wrong though ...
and apologies once again for the shopping cart debacle yesterday. some
poeple were complaining and rightly so. i received a doze
I'm trying to do a filexchange script.
Does anyone know how to upload a file into the database such that when I do a 'select
*' query, I can click on a link the download that file.
i think you need
SELECT * FROM news WHERE fdate >= '$date' AND tdate >= '$date'
the dates have to be single-quoted in your query string
i generally use
$query = "SELECT * FROM news WHERE fdate >= '".$date."' AND tdate >=
'".date."'";
this may not be the best way and i would really appreciate
Hello,
I'd like to use PHP4 on IIS to access a MSSQL7 server, but i have problems
reading large text fields :
- "nvarchar" fields are truncated to 255 chars.
- "ntext" fields generated the following error message :
>>>
Warning: MS SQL message: Impossible d'envoyer les données ntext aux client
Hi,
I'm trying to insert a row into an MSSQL7 table using the SQL string:
INSERT INTO person (birthdate,deathdate,sname,othername,motherid,fatherid)
VALUES ('1978-10-06',NULL,'Fairs','Daniel',NULL,NULL) SELECT @@identity AS
last_identity
The actual PHP code is
$oRes = mssql_query("SET NOCOUNT O
>On Mon, 9 Apr 2001, Bob Hall wrote:
>
> > > MySQL is providing an SQL frontend to a
> > >bunch of tables and indices, that is it ... it is up to the programmer to
> > >handle the "managing of data" part where it revolves around being
> > >relational ...
> >
> > I've developed database apps
Is somebody an example of create type under Postgres (v. 7) I have a probleme with the
input function of the new type:
parcmicro=# CREATE TYPE "macad" ( internallength = variable, externallength =
variable, input = macadi, output = macado, PASSEDBYVALUE);
CREATE
parcmicro=# create table toto
On 11 Apr 2001, at 11:40, Daniel Fairs wrote:
> Hi,
>
> I'm trying to insert a row into an MSSQL7 table using the SQL string:
>
> INSERT INTO person (birthdate,deathdate,sname,othername,motherid,fatherid)
> VALUES ('1978-10-06',NULL,'Fairs','Daniel',NULL,NULL) SELECT @@identity AS
> last_identi
On 11 Apr 2001, at 13:00, [EMAIL PROTECTED] wrote:
> >
> (returns the number of rows selected, to be
> more precise).
Ehm... forget this part. I momentaneally disconnected the brain, I'm
afraid :-)
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Fabrizio Ermini Alt
Have you done the file upload into the database?
I´m having some problem to put the file (like .doc or .xls) in a database...
I´m using 'text' field type, is it right?
Do you have any example about it?
Tks.
""Zeus"" <[EMAIL PROTECTED]> escreveu na mensagem
01e601c0c26e$6ccded80$735518d2@zeus">n
No things of all
Only upload the file, move to the right location and insert the file link
(location path) into the database.
READY!
Bey,
Daniel Kieviet
Xsarus Internetservices
Holland
- Original Message -
From: "Lucio Stoco" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednes
Hope this helps.
Lisa
http://someurl.com/pics";
if (isset($fupload ))
{
if ($fupload_type == "image/gif")
{
copy ($fupload, "$file_dir/$fupload_name") or die ("Couldn't copy");
}
}
}
?>
Home page
-Original Message-
From: Xsarus
Hi everybody,
I am trying to use cookies in my website and want to ask you these
questions:
1. Header("Set-Cookie") or SetCookie() is better? as the setcookie manual
comments said that Header("Set-Cookie") is better.
2. Domain=myserver.com OR domain=.myserver.com OR skip the domain argument
is be
Did you try to use 'TEXT' field type?
""Manuel Prieur"" <[EMAIL PROTECTED]> escreveu na mensagem
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
>
> I'd like to use PHP4 on IIS to access a MSSQL7 server, but i have problems
> reading large text fields :
>
> - "nvarchar" fields are trunca
Hi Brian,
this really depends on what kind of user authentication you are using
by now. Apache is capable of doing authentication by many methods, not
only static .htaccess files, but also via MySQL, PAM or other. You
should speicify what kind of system you are using ...
HTH
Victor
> Okay,
>
>
Blob or link?
Insert just the link is the better way?
Does the security is the same?
Thanks,
Anderson Sone
> No things of all
>
> Only upload the file, move to the right location and insert the file link
> (location path) into the database.
>
> READY!
>
> Bey,
> Daniel Kieviet
> Xsarus Inter
Can you use max within a select function?
This is where I have it...
$cd_qry = 'select max(code) from equipment';
connecttodb();
$result = mysql_query($cd_qry);
$temp = mysql_fetch_row($result);
$bcode = $BCODE_START . str_pad((substr($temp[0], -6) +
1),6,'0',STR_
I am in the process of setting up some searches in php for a database.
Currently my test data consist of about 10k records. I am unsure what
the operational total will be but I would bet less than 1 million
records. The table in question has 13 fields and of these 13 fields I
would like to
Hi, first post :)
I have an interesting project. I have a basic form passing answers
into mysql. I have a db with multiple tables, each table contains
several fields, but I am only concerned with 16 of these fields
which contain the answers "A" "B" "C" "D" etc., not all fields
contain the same n
Hi Liz, thanks for the reply! I have tried this, as well as
added to this approach, but I am still not sure what to do
with the results of the query (count, sum(*)) to produce
the needed final output ("5 chose A for answer1", or "20%
chose A for answer1").
Using the code below with my additions q
I have PHP4 and MySQL running on a W98 PWS webserver.
My database is ported from Access and looks fine in MySQL.
I can query the database from a webbrowser window, but the result
("capital o with dots" for example) come out as "TM" (as in the
trademark symbol).
I know that this is because of the
>
> Should i do something with MySQL?
> Should i write a routine in PHP that scan every text returned for the
> characters and if found - change them before printing them to the
> browser? This seems like a slow process.
>
There's already a function called HTMLentities() that could give you
an
How do I create a table within my PHP? Heres what I currently have, but I
keep getting parse error on the "create" line...
$result = mysql_query($sql);
create table $propTable (
ID int not null auto_increment primary key,
TourName tinytext,
TourTitle tinytext,
ViewTitle tinytext,
TourNum tinyint
> How do I create a table within my PHP? Heres what I currently have, but I
> keep getting parse error on the "create" line...
Because create is not a valid PHP command. You have to assign the create
statement to a string, _then_ pass the string to mysql_query:
$sql = "create table $propTable
Hello-
I was wondering how do I connect to a MySQL database, using php, when php
and MySQL are on two separate computers?
Thanks,
Jay
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the lis
Hi,
While writing dynamic pages I use pg_connect to connect to the database.
I wanted to know whether i alway need to close database connection or while
closing the FORM or going to another page does the connect close automatically.
Is pg_close necessary to be given ?
--
The se
say u say a query like
SELECT * from user where user='sharmad';
Is there any variable like pg_Result that will count the number of differnet
values in * ?
like i wanted to give something like
for($i=0;$ihttp://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands
In article <00c701c0c2af$be478f40$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] ("Darryl Friesen") wrote:
> > How do I create a table within my PHP? Heres what I currently have, but I
> > keep getting parse error on the "create" line...
>
> Because create is not a valid PHP command. You have to assign
you should look at php.net. Having never used postgres, my imagination
thinks that perhaps http://www.php.net/manual/en/function.pg-numfields.php
is what you're after.
and btw, if you're fetching a whole row, don't retreive a field at a time -
its very slow. use a fetch_array or something.
siggy
Our Xerox production printers export a log in ':' delimited format.
No big deal, except that each field has a tag like so:
Job ID = 99
Job ID = 98
Job ID = 97
See what I mean?
I have simply imported the whole CSV file into Access and was now wondering if I could
do the following?
>Is there a way to do this in the query? I am totally inexperienced.
Why not remove the part you don't want to import.. very easy in Access.
Bye,
B.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTEC
This isn't strictly a PHP question, I suppose... but is anyone aware of a
date_format function for Oracle comparable to MySQL's date_format() function?
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi Richard,
try TO_DATE or TO_CHAR , depending upon what you are trying to do,
there are about 2 pages of formatting options for these functions.
HTH
Steve
At 10:12 PM + 11/4/01, Richard Crawford wrote:
>This isn't strictly a PHP question, I suppose... but is anyone aware of a
>date_format
RDB--
You should try...
SELECT * FROM table WHERE INSTR(field1, '97') > 0
[selects everything from 'table' where field1 has that job number within it]
Or, if you just wanted to run a query that would update every entry to not
include that "Job ID =" you could...
UPDATE table field1=SUBSTR
I can't find the answer to this, I know it's easy.
What's the SELECT statment I want to use to find duplicate entries in a
specific field?
Thanks in Advance!
Shawn Sellars
At 03:38 PM 4/11/2001 -0700, SHAWN wrote:
>What's the SELECT statment I want to use to find duplicate entries in a
>specific field?
SELECT column_name, count(*) AS doubles FROM some_table HAVING doubles > 1
GROUP BY colname
This should grab all instances where there are multiple instances of
"
At 04:08 PM 4/11/2001 -0700, Ron Brogden wrote:
>SELECT column_name, count(*) AS doubles FROM some_table HAVING doubles > 1
>GROUP BY colname
Ack, that GROUP BY should be "column_name" (was trying to make it more
obvious and missed the last reference).
Cheers
-
Also consider the oracle sql
ALTER SESSION SET NLS_DATE_FORMAT='-MM-DD HH24:MI:SS'
or whichever format you prefer.
This sets the default format returned when selecting a date column.
-Joe
"Steve Farmer" <[EMAIL PROTECTED]> wrote in message
news:p04320402b6fa8a7ffc70@[203.28.219.179]...
>
I have a simple news manager and I would like to display the first two sentences of a
news story. I got this select statement from the mysql mailing list:
SELECT substring_index( body, ". ", 2) FROM news;
This works great from the mysql client but when I try it using php with this:
$result =
on 4/11/01 7:48 PM, Mike Baerwolf at [EMAIL PROTECTED] wrote:
> SELECT substring_index( body, ". ", 2) FROM news;
>
> This works great from the mysql client but when I try it using php with
> this:
>
> $result = mysql_query("SELECT substring_index(body, "." ,2) FROM news"
The way you have thi
Hi Joe,
Yes, I put this in as a standard statement immediately after i
connect to the orcale database, it is also possible to put it in your
init.ora file i believe
rgds
Steve
At 8:28 PM -0400 11/4/01, Joe Brown wrote:
>Also consider the oracle sql
>
>ALTER SESSION SET NLS_DATE_FORMAT='-MM
Why you want to create MAC address type? It's already there in V7.
macaddr| XX:XX:XX:XX:XX, MAC address
Besides, do you have functions defined for INPUT and OUTPUT?
You must define them. Refer to PostgreSQL User Manual for details.
Regards,
--
Yasuo Ohgaki
"Olivier Thauvin" <[EMAIL PROTEC
PHP takes care of closing it, just like other resources. However, it seems there
is bug in closing none persistent PgSQL link in current version. 4.0.5 hopefully
fix this.
Regards,
--
Yasuo Ohgaki
"Sharmad Naik" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
Hi,
DB2 returns a FALSE result when selects, updates and deletes return no rows.
I can suppress the error using my php.ini file, but I'd like a way of
knowing if the query failed or if no rows were affected.
Is there I way that I can differentiate between this in the code?
Thanks,
Chris Book
[E
Yesterday, I saw in Postgres User Manual that plpgsql cannot define function for
create type. The function must be define in C language.
But i don't understand this language.
Thanks a lot.
Le Jeudi 12 Avril 2001 06:25, vous avez écrit :
> Why you want to create MAC address type? It's already t
47 matches
Mail list logo