problem with PHP
am 20.11.2002 23:26:35 von fmosse
This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.
--=_natalia-13573-1037831531-0001-2
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Mime-Autoconverted: from quoted-printable to 8bit by courier 0.40
Hi!!
I found your email addresses in www.postgresql.org
I am working in a PHP search engine made with PHP and Postgres...
The database has one table called "findmaan" with the following info
Column | Type | Modifiers
-------------+------------------------+-----------
url | character varying(255) |
title | character varying(255) |
keywords | text |
description | text |
category | integer |
rating | integer |
cache | text |
and there is another table called "categorias_findmaan"
Column | Type | Modifiers
-------------+------------------------+--------------------- --------------------------------------------
idx | integer | not null default nextval('"categorias_findmaan_idx_seq"'::text)
descripcion | character varying(255) |
Unique keys: categorias_findmaan_idx_key
well.. what´s my problem? : I want to call the name of the category from the idx of the table "categorias_findmaan"...
for example, if I add one site in the table "findmaan" whose category is number "5", then the search engine would have to search in table "categorias_findmaan" and find, por example, that that number category is for "Culture web sites"...
So.. I can´t understant how do I have to do this...
and secondly... how do I add data to the table "categorias_findmaan" if the type is a integer?? I mean, how would I add the number 1=tennis web sites or 2=educational web sites etc...
I hope you can help me...
-------------------------
Francisco Mosse
Coordinador de www.TangoStore.com
Zivals S.A. - Tangostore.com
Av. Callao 395
C1022AAD Buenos Aires
Argentina
Tel 54 11 4371 7500
Fax 54 11 4371 7437
--=_natalia-13573-1037831531-0001-2
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Mime-Autoconverted: from quoted-printable to 8bit by courier 0.40
Hi!!
I found your email addresses in
href="http://www.postgresql.org">www.postgresql.org
I am working in a PHP search engine made with PHP
and Postgres...
The database has one table called "findmaan" with
the following info
Column
|
Type | Modifiers
-------------+------------------------+-----------
url
| character varying(255) |
title |
character varying(255) |
keywords |
text
|
description |
text
|
category |
integer
|
rating |
integer
|
cache |
text
|
and there is another table called
"categorias_findmaan"
Column
|
Type
|
Modifiers
-------------+------------------------+--------------------- --------------------------------------------
idx
|
integer
| not null default
nextval('"categorias_findmaan_idx_seq"'::text)
descripcion | character
varying(255) |
Unique keys: categorias_findmaan_idx_key
well.. what´s my problem? : I want to call the name
of the category from the idx of the table "categorias_findmaan"...
for example, if I add one site in the table
"findmaan" whose category is number "5", then the search engine would have to
search in table "categorias_findmaan" and find, por example, that that number
category is for "Culture web sites"...
So.. I can´t understant how do I have to do
this...
and secondly... how do I add data to the table
"categorias_findmaan" if the type is a integer?? I mean, how would I add the
number 1=tennis web sites or 2=educational web sites
etc...
I hope you can help me...
-------------------------
Francisco Mosse
Coordinador de
href="http://www.TangoStore.com">www.TangoStore.com
Zivals S.A. -
Tangostore.com
Av. Callao 395
C1022AAD Buenos Aires
Argentina
Tel 54 11 4371 7500
Fax 54 11 4371 7437
--=_natalia-13573-1037831531-0001-2--
Re: problem with PHP
am 23.11.2002 01:11:27 von Keary Suska
> This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
--MS_Mac_OE_3120829887_47165785_MIME_Part
Content-type: text/plain; charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable
on 11/20/02 3:26 PM, fmosse@zivals.com purportedly said:
well.. what=B4s my problem? : I want to call the name of the category from =
the
idx of the table "categorias_findmaan"...
for example, if I add one site in the table "findmaan" whose category is
number "5", then the search engine would have to search in table
"categorias_findmaan" and find, por example, that that number category is
for "Culture web sites"...
So.. I can=B4t understant how do I have to do this...
and secondly... how do I add data to the table "categorias_findmaan" if the
type is a integer?? I mean, how would I add the number 1=3Dtennis web sites
or 2=3Deducational web sites etc...
What you seem to be asking here are basic SQL concepts. The list can't
really teach you SQL. There are many good books that can teach you SQL, or
you can try the tutorial at www.postgres.org.
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
--MS_Mac_OE_3120829887_47165785_MIME_Part
Content-type: text/html; charset="ISO-8859-1"
Content-transfer-encoding: quoted-printable
Re: [PHP] problem with PHP
on 11/20/02 3:26 PM, fmosse@zivals.com purportedly said:
well.. what=B4s my proble=
m? : I want to call the name of the category from the idx of the table &quo=
t;categorias_findmaan"...
for example, if I add one site in the table "findmaan" whose cate=
gory is number "5", then the search engine would have to search i=
n table "categorias_findmaan" and find, por example, that that nu=
mber category is for "Culture web sites"...
So.. I can=B4t understant how do I have to do this...
and secondly... how do I add data to the table "categorias_findmaan&qu=
ot; if the type is a integer?? I mean, how would I add the number 1=3Dtenni=
s web sites or 2=3Deducational web sites etc...
What you seem to be asking here are basi=
c SQL concepts. The list can't really teach you SQL. There are many good bo=
oks that can teach you SQL, or you can try the tutorial at www.postgres.org=
..
Keary Suska
Esoteritech, Inc.
"Leveraging Open Source for a better Internet"
--MS_Mac_OE_3120829887_47165785_MIME_Part--
Help...
am 16.12.2002 23:26:38 von fmosse
This is a multi-part message in MIME format.
------=_NextPart_000_000E_01C2A539.0DE62260
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi!
What is wrong? My server has PHP and Postgre
I can=B4t understand hoy do I get this error... look
I start with a value ($quebuscototal) and I should get an array like this (=
"'abc', 'def', 'ghi', 'jkl') ?
but with this code, what I receive is an array where the first element is '=
abc', 'def', 'ghi', 'jkl'
instead of being 'abc' (and the second one, 'def', the third one 'ghi', etc=
..)
$quebuscototal =3D "abc def ghi jkl";
$quebuscototal =3D str_replace(' ',' \', \'',$quebuscototal);
$quebuscototal =3D "'$quebuscototal'";
$quebuscofinal =3D array($quebuscototal);
$quees =3D "$quebuscofinal[1] ";
What is wrong with my code? Thanks!!
Francisco
-------------------------=20
Francisco Mosse=20
Coordinador de www.TangoStore.com
Zivals S.A. - Tangostore.com=20
Av. Callao 395=20
C1022AAD Buenos Aires=20
Argentina=20
Tel 54 11 4371 7500=20
Fax 54 11 4371 7437=20
------=_NextPart_000_000E_01C2A539.0DE62260
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi!
What is wrong? My server has PHP and=20
Postgre
I can=B4t understand hoy do I get this err=
or...=20
look
I start with a value ($quebuscototal) =
;and I=20
should get an array like this ("'abc', 'def', 'ghi', 'jkl') ?
but with this code, what I receive is an a=
rray=20
where the first element is 'abc', 'def', 'ghi', 'jkl'
instead of being 'abc' (and the second one=
, 'def',=20
the third one 'ghi', etc.)
$quebuscototal =3D "abc de=
f ghi=20
jkl";
$quebuscototal =3D str_replace(' ',' \',=20
\'',$quebuscototal);
$quebuscototal =3D "'$quebuscototal'";
$quebusco=
final =
array($quebuscototal);
$quees =3D "$quebuscofinal[1] ";
What is wrong with my code? Thanks!!
>
Francisco
-------------------------
Francisco Mosse
Coordinador de
href=3D"http://www.TangoStore.com">www.TangoStore.com
Zivals S.A. -=
=20
Tangostore.com
Av. Callao 395
C1022AAD Buenos Aires
Argentina=
=20
Tel 54 11 4371 7500
Fax 54 11 4371 7437
size=3D2>
------=_NextPart_000_000E_01C2A539.0DE62260--
Re: Help...
am 17.12.2002 00:02:42 von Scott Marlowe
On Mon, 16 Dec 2002, Francisco Mosse - (Zivals) wrote:
> Hi!
>
> What is wrong? My server has PHP and Postgre
> I can´t understand hoy do I get this error... look
> I start with a value ($quebuscototal) and I should get an array like
> this ("'abc', 'def', 'ghi', 'jkl') ?
> but with this code, what I receive is an array where the first element
> is 'abc', 'def', 'ghi', 'jkl' instead of being 'abc' (and the second
> one, 'def', the third one 'ghi', etc.)
>
> $quebuscototal = "abc def ghi jkl";
> $quebuscototal = str_replace(' ',' \', \'',$quebuscototal);
> $quebuscototal = "'$quebuscototal'";
> $quebuscofinal = array($quebuscototal);
> $quees = "$quebuscofinal[1] ";
The array() construct is not a function, so it's generally used
only to create arrays without variables. I'm not sure if it can handle
vars inside it. There are maybe some tricks to get around this, but
implode/explode are better for mucking with arrays anyway.
I'll try to give a little help.
$quebuscototal = "abc def ghi jkl";
$quees = explode(" ",$quebuscototal);
should result in an array like this:
$quees[0]="abc";
$quees[1]="def";
$quees[2]="ghi";
$quees[3]="jkl";
There are lots of fun ways to manipulate arrays in PHP, by the way. Look
at explode, implode, array_pop, array_push and some of the others listed
in the docs.
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://archives.postgresql.org