Re: [PHP-DB] Primary Key Value

2001-02-27 Thread Richard S. Crawford

Perfect!  Thanks.

At 01:05 PM 2/28/01 +0800, Beau Lebens wrote:
>mysql_insert_id()
>i *think* also
>pg_lastiod()
>or something similar...
>
>At 08:57 PM 2/27/01 -0800, Richard S. Crawford wrote:
>>Suppose I put data into a table using an Insert query, and that the table 
>>generates a primary key for the data.  Is there a way to get at that 
>>primary key without running a separate select query against the table?
>>
>>
>>--
>>PHP Database Mailing List (http://www.php.net/)
>>To unsubscribe, e-mail: [EMAIL PROTECTED]
>>For additional commands, e-mail: [EMAIL PROTECTED]
>>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>--
>Beau Lebens - Web Master
>Insurance My Way, Your Friendly Online Broker
>(08) 9226 5888
>http://www.insurancemyway.com.au/
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Primary Key Value

2001-02-27 Thread Beau Lebens

mysql_insert_id()
i *think* also
pg_lastiod()
or something similar...

At 08:57 PM 2/27/01 -0800, Richard S. Crawford wrote:
>Suppose I put data into a table using an Insert query, and that the table 
>generates a primary key for the data.  Is there a way to get at that 
>primary key without running a separate select query against the table?
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
Beau Lebens - Web Master
Insurance My Way, Your Friendly Online Broker
(08) 9226 5888
http://www.insurancemyway.com.au/


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Primary Key Value

2001-02-27 Thread Richard S. Crawford

Suppose I put data into a table using an Insert query, and that the table 
generates a primary key for the data.  Is there a way to get at that 
primary key without running a separate select query against the table?


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Can't connect to local MySQL server error

2001-02-27 Thread Joe Brown

Heh, hate this gotcha...
The file permissions are good...  ok, now check each directory up to
mysql.loc
/var
/var/lib
/var/lib/mysql
Does the world have read and execute perms on all of the above (hehe made a
funny)?

Without read and execute perms on the parent directories, the world cannot
see the file to have read write and execute to the socket file.

gl
"Rick Emery" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> MySQL is running; I can execute MySQL as ROOT.  The
> /var/lib/mysql/mysql.sock file exists with read/write/execute permissions
to
> user/group/world.
>
> Any other ideas are appreciated.
>
> Thanks
>
> rick
>
> Richard L. Emery
> IT Sr. Project Manager
>
> "There is no 'trying'...
> There is only 'Do' or 'Not Do' "
>
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, February 26, 2001 4:46 PM
> To: Rick Emery; [EMAIL PROTECTED]
> Subject: RE: [PHP-DB] Can't connect to local MySQL server error
>
>
> Addressed to: Rick Emery <[EMAIL PROTECTED]>
>   '[EMAIL PROTECTED]'
>
> ** Reply to note from Rick Emery <[EMAIL PROTECTED]> Mon, 26 Feb 2001
> 14:33:32 -0600
> >
> > I tried:  Grant ALL ON *.* to user@localhost IDENIFIED BY "password";
> > so as to provide access to all tables.  I should have stated that the
> error
> > I got was that I could not connect to the
> > /var/lib/mysql/mysql.sock socket.
>
> Make sure that MySQL is running, that the mysql.sock file exitst, in the
> specified location, and that the permsiions on that file, and every
> directory above it allow the user the web server runs as has read
> and execute rights.  Note that execute for directories means that you
> can cd to it, and has nothing about running programs from within it.
>
>
> If the file is missing, try to find it  (locate)  and look in php.ini
> for a setting to specify the correct location for your system.
>
> Rick Widmer
> Internet Marketing Specialists
> http://www.developersdesk.com
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] MySQL join problem

2001-02-27 Thread Joe Brown

I doubt that a few thousand records would be more than mysql is capable of
handeling.
However my ignorance of Mysql is abundant.

Does it use the /tmp directory and is your /tmp or root partition small?
(guessing linux here).

Does mysql use the /tmp directory for temporary tables?
(Answer in ReadMe(s) probably)...

""Elliott Lee"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> Hi all,
>
> This may not necessarily be a PHP problem, but I was initially trying to
do
> this in PHP.  I was trying to do a join of two tables and I get a response
> from MySQL saying that some SQL temp file was out of space.  One of my
> tables has a few thousand items in it and my other table that I'm joining
> with is pretty small, maybe 15 items.  Is there a limitation to the size
of
> the query that I can do?  I'm not out of disk space either.
>
> Elliott
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Search engines & database driven sites

2001-02-27 Thread CC Zona

(re-ordered to bottom-posting, for clarity)

In article <[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Scott Bernard") wrote:


> I recently converted my sites from hardwired HTML to a PHP/MySQL
> combination - with dynamic 'newsy' info held in a database, tailored for
> each visitor. Unfortunately the 'hit rate' from search engines has gone
> virtually to zero as Altavista, Hotbot etc. removed me from their indexes -
> they don't index .php files as far as I can see, and also don't follow links
> on php pages (I imagine it's the same for ASP, ColdFusion etc.). In contrast
> Google and All The Web have no problems with the .php extension (and even
> index my .pdf files!).


> What you can do is create an html page blank, with meta-tags for the search
> engines, but including the meta:
> 
> 
> at the first line. This is going to redirect to the indicated php page.
> 
> I think its a solution, for the search enginges as for the users, because
> the will not see anything.
> 

Some search engines don't care, but not all view this in the same way.  
According to Search Engine Watch 
, AltaVista and 
Go.com are among those who treat a meta refresh as spam.  And since 
AltaVista is one of those you're trying to improve ranking with...

-- 
CC

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Sorting alphabetically and Tv guide

2001-02-27 Thread Fernando Gabriel Ranea

Hi!

You can order everything but you must be carefull in the database design.

Select "program" from "table" order by "time"

Where "time" is a DATE value in your database. In mysql you have a variety the
formats. For example,

DATETIME: -MM-DD hh:mm:ss

Maybe you need use a good book related to SQL. The Practical SQL Handbook is a
good book.
Regards,

Matthew Cothier wrote:

> Thanks!
>
> The other thing that I have been asked to design is an online tv guide for a
> list of shows. Basically I want to be able to display a list of programmes
> on the front page for the current date in time order. Can this be done in
> the same way as alphabetical ordering?
>
> I will also have a seperate page for each individual show with listings for
> that show only, as well as details about the show an episode guide etc...
>
> And if that isn't enough I want people to be able to search for a show or a
> specific date via a search box.how exactly do I do a query?
>
> AND to select from a drop down box the date they want to view on the front
> pagehow would I display two weeks worth of days in a select form from
> the date that they view the page?
>
> Again thankyou! I have lotsof pieces to the puzzle its just gaining more
> pieces and fitting it together. If anyone can help with any of this
> Thankyou!
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Search engines & database driven sites

2001-02-27 Thread Scott Bernard

What you can do is create an html page blank, with meta-tags for the search
engines, but including the meta:


at the first line. This is going to redirect to the indicated php page.

I think its a solution, for the search enginges as for the users, because
the will not see anything.

Regards.

ids.-

-Mensaje original-
De: Grant Ballard-Tremeer [mailto:[EMAIL PROTECTED]]
Enviado el: Martes, 27 de Febrero de 2001 09:25 a.m.
Para: [EMAIL PROTECTED]
Asunto: [PHP-DB] Search engines & database driven sites


Greetings

I'm not sure my question fits into the remit of this list - so apologies in
advance if it's off track... Please point me in a more suitable direction is
necessary!

I recently converted my sites from hardwired HTML to a PHP/MySQL
combination - with dynamic 'newsy' info held in a database, tailored for
each visitor. Unfortunately the 'hit rate' from search engines has gone
virtually to zero as Altavista, Hotbot etc. removed me from their indexes -
they don't index .php files as far as I can see, and also don't follow links
on php pages (I imagine it's the same for ASP, ColdFusion etc.). In contrast
Google and All The Web have no problems with the .php extension (and even
index my .pdf files!).

I would be grateful for any wisdom on how best to deal with this. I could of
course make an HTML intro page, but that would be a pity since I'd hardly be
able to an intro page that conveys all the necessary info to bring the right
visitors. Any advice on how to do this well? I could alternatively change
the setting of the PHP parser to parse all .html as if it's php.
Unfortunately I'm sharing a server right now and my ISP is unlikely to
accept this because of the reduction in performance (I may be prepared to
move to a dedicated server if necessary though). Lastly I thought of writing
a PHP routine that, run once a day, will make a few HTML 'mirror' pages
based on the content of the database to capture the search engine visitors.
I could do that, but it seems to defeat the purpose of the dynamic pages
somewhat... pity.

Any other ideas? How do others deal with this issue?

Regards
Grant

---
Grant Ballard-Tremeer,
HEDON Household Energy Network http://www.ecoharmony.net/hedon/
eco Ltd. http://ecoharmony.com
---




--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] MySQL join problem

2001-02-27 Thread Elliott Lee

Hi all,

This may not necessarily be a PHP problem, but I was initially trying to do
this in PHP.  I was trying to do a join of two tables and I get a response
from MySQL saying that some SQL temp file was out of space.  One of my
tables has a few thousand items in it and my other table that I'm joining
with is pretty small, maybe 15 items.  Is there a limitation to the size of
the query that I can do?  I'm not out of disk space either.

Elliott

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Sorting alphabetically and Tv guide

2001-02-27 Thread Matthew Cothier

Thanks!

The other thing that I have been asked to design is an online tv guide for a 
list of shows. Basically I want to be able to display a list of programmes 
on the front page for the current date in time order. Can this be done in 
the same way as alphabetical ordering?

I will also have a seperate page for each individual show with listings for 
that show only, as well as details about the show an episode guide etc...

And if that isn't enough I want people to be able to search for a show or a 
specific date via a search box.how exactly do I do a query?

AND to select from a drop down box the date they want to view on the front 
pagehow would I display two weeks worth of days in a select form from 
the date that they view the page?

Again thankyou! I have lotsof pieces to the puzzle its just gaining more 
pieces and fitting it together. If anyone can help with any of this 
Thankyou!
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Sorting alphabetically

2001-02-27 Thread Fernando Gabriel Ranea

Hi!

I guess that you want the following:

Select "name" " from "Table" order by "name"

For the search box, you need build a form, send the search value to the script
(a PHP script for this list :-o) and the script must query in your database.
The script depends on the complexity in the search and result presentation
Regards,

Matthew Cothier wrote:

> Thanks everyone for helping me with the resolution problems, its sorted now!
>
> Q. How do I sort a list of names onto a page into a table in alphabetical
> order?
>
> I am doing a link database and require that I have a list of catagorie names
> in alphabetical order with the links listed alphabetically underneath each
> heading.
>
> Also, you may have guessed I am a newbe?!?!, how do I allow people to search
> this directory via a search box? And also to search seperate catagories?
>
> Any help would be brilliant!
>
> Thanks,
>
> Matt
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Sorting alphabetically

2001-02-27 Thread Matthew Cothier

Thanks everyone for helping me with the resolution problems, its sorted now!

Q. How do I sort a list of names onto a page into a table in alphabetical 
order?

I am doing a link database and require that I have a list of catagorie names 
in alphabetical order with the links listed alphabetically underneath each 
heading.

Also, you may have guessed I am a newbe?!?!, how do I allow people to search 
this directory via a search box? And also to search seperate catagories?

Any help would be brilliant!

Thanks,

Matt
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Linux+PHP+Infomix....

2001-02-27 Thread Javier Morquecho Morquecho



Somebody has installed the informix support to php with the apxs (APache
eXtenSion tool)??

-Mensaje original-
De: Mark Farver [mailto:[EMAIL PROTECTED]]
Enviado el: Viernes 9 de Febrero de 2001 11:53 AM
Para: Javier Morquecho Morquecho
CC: 'php-db list'
Asunto: RE: [PHP-DB] Linux+PHP+Infomix


On Fri, 9 Feb 2001, Javier Morquecho Morquecho wrote:

>   I'm just starting to use informix database, how can I install the
informix
> support on my
> apache server??, I have been looking for something like a RPM file, but I
>   Any tip how can I to start?, or where can I looking for?

Well.. you're probably not going to find a rpm.  Instead you'll need to
recompile php with informix support.  Read the standard docs on compiling
and installing php, but on the command line for configure you'll need to
add --with-informix=/dir/you/installed/informix

You'll need to have the informix client on your php box before you
start, read the informix documentation on how to install, configure and
test your connection to the db before trying to get PHP working.

The php installation guide can be found here:
http://www.php.net/manual/en/installation.php


Mark


--
"The greatest dangers to liberty lurk in insidious enroachment by mean of
zeal, well-meaning but without understanding."
-- Justice Louis O. Brandeis, Olmstead vs. United States


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Anyone tried a MySQL load data infile statement?

2001-02-27 Thread Miles Thompson

In the Python language, witht he appropriate module, one can construct a 
string like:

"load data infile 'pwlist.txt' replace into table subscriber fields 
terminated by '\t' optionally enclosed by '"' lines terminated by '\r\n' ",

pass it to the cursor.execute() function and it completes.

I've tried this, assingning the string to $sql, and then issuing 
mysql_query( $sql ), all in the hope that magic would happen. It hasn't. I 
guess what I was sort of counting on was that mysql_query(), despite its 
name and obvious function might also be a general purpose execution tool 
for MySQL commands.

Anyone tried anything similar? It's a really cool way to quickly update a 
database from a, in this case, tab-delimited file.

Miles Thompson


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Search engines & database driven sites

2001-02-27 Thread Karsten Dambekalns

On Tue, Feb 27, 2001 at 09:03:58PM +0100, Roel Mulder wrote:

> Build the link above like this:  http://www.site.com/dir/25.html this 
> document doesn't exist.
> In that directory you refer the 404's to article.php where you call 
> getenv("REQUEST_URI")  and look, it says 25.html which you can then use to 
> query the database and show that article :)

Bettzer do that using mod_rewrite (at least on Apache). mod_rewrite is a
mighty powerful thing...

BTW: Please think about full quotings :-/

Karsten
-- 
Why do we have to hide from the police, daddy?
Because we use emacs, son. They use vi.
-
mailto:[EMAIL PROTECTED] w³: http://www.k-fish.de/
gpg: http://www.k-fish.de/mykeys.gpg

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Resolution detect and redirect

2001-02-27 Thread Thor M. Steindorsson


> -Original Message-
> From: Darryl Friesen [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, February 27, 2001 12:57 PM
> To: db
> Subject: Re: [PHP-DB] Resolution detect and redirect
>
>
> >>>Why not just create a table that will resize to any resolution?
> >>
> >> Because I am using different sized images for the different resolutions
> as
> >> well as other page thingys.
> >>
> >> And I need the script for other things too.
> >>
> >> So can anyone help?
>
> Is there anyway to convince you this is a very very bad idea?  Leave the
> choice up to the user.
>
> Why?  Sure, my screen resolution is 1024x768, but I never run the browser
> full screen (I'd bet 99% of people don't), so forcing me to view
> a page that
> only looks good at 1024x768 when my window size is closer to 800x600 just
> annoys me (I've seen a few sites like that; left immediatly even
> though they
> were good sites).
>
> If I have the choice, I'll pick the one I think is closest to my current
> window size.  I've seen several sites that do this.  Much better.
>

Although it's not available in PHP, you can use JavaScript to determine the
actual usable size of the browser window, which would eliminate the issue
mentioned above.

> Another reason not to do this is all the extra work in maintaining all the
> different versions of pages/images etc.  Better to spend the time writing
> PHP code. :)
>
>
> - Darryl
>
>  --
>   Darryl Friesen, B.Sc., Programmer/Analyst[EMAIL PROTECTED]
>   Education & Research Technology Services, http://gollum.usask.ca/
>   Department of Computing Services,
>   University of Saskatchewan
>  --
>   "Go not to the Elves for counsel, for they will say both no and yes"
>
>
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Resolution detect and redirect

2001-02-27 Thread Ben - FCP

Would be a feat indeed if you could get PHP to do this! It does need
Javascript to do (although having returned the result, you could then carry
this forward by setting a variable server side (in php!) that identified the
user and continued to display appropriate page versions).

If you were feeling really clever, you could even go the whole hog and store
these as variables using the session functions of PHP4 (would then mean that
the variable as well as any others you choose to set for the user don't have
to be laboriously carried over each time). Just a thought.

Seriously though,  definitely worth trying http://www.irt.org I would be
very supprised if there wasn't an FAQ specifically about this (its actually
very easy to do in Javascript).

Have fun,

Ben Stoneham
Technical Director - FCP Internet LTD

___

FCP Internet LTD - 'Making the Web Work for You'

70 Smithbrook Kilns, Cranleigh, Surrey, GU6 8JJ, UK.

Tel. 01483 272 303 Fax. 01483 272 303 mail: [EMAIL PROTECTED]

http://www.fcpl.com

___

-Original Message-
From: Joe Brown [mailto:[EMAIL PROTECTED]]
Sent: 27 February 2001 20:46
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Resolution detect and redirect


This feat will require a java script (not appropriate for php/db).

I saw something on a javascript site, perhaps www.webreference.com

gl

""Matthew Cothier"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >Why not just create a table that will resize to any resolution?
>
> Because I am using different sized images for the different resolutions as
> well as other page thingys.
>
> And I need the script for other things too.
>
> So can anyone help?
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Resolution detect and redirect

2001-02-27 Thread Darryl Friesen

>>>Why not just create a table that will resize to any resolution?
>>
>> Because I am using different sized images for the different resolutions
as
>> well as other page thingys.
>>
>> And I need the script for other things too.
>>
>> So can anyone help?

Is there anyway to convince you this is a very very bad idea?  Leave the
choice up to the user.

Why?  Sure, my screen resolution is 1024x768, but I never run the browser
full screen (I'd bet 99% of people don't), so forcing me to view a page that
only looks good at 1024x768 when my window size is closer to 800x600 just
annoys me (I've seen a few sites like that; left immediatly even though they
were good sites).

If I have the choice, I'll pick the one I think is closest to my current
window size.  I've seen several sites that do this.  Much better.

Another reason not to do this is all the extra work in maintaining all the
different versions of pages/images etc.  Better to spend the time writing
PHP code. :)


- Darryl

 --
  Darryl Friesen, B.Sc., Programmer/Analyst[EMAIL PROTECTED]
  Education & Research Technology Services, http://gollum.usask.ca/
  Department of Computing Services,
  University of Saskatchewan
 --
  "Go not to the Elves for counsel, for they will say both no and yes"





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] md5

2001-02-27 Thread bryan

Yeah, i am aware of the 32 byte character string.  As a matter of fact, I
md5 the password on initial
sign-up.  Then just compare it to the regular password.  As for this case, I
am trying to
update the password that is already md5 'd in the database.  The problem is,
I am creating a
random string (with letters and numbers) and making it 10 characters long.
I think md5
has a problem with this, for some reason

Probably just me though.  Thanks for the advice.

bryan


- Original Message -
From: "Joe Brown" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 27, 2001 12:40 PM
Subject: Re: [PHP-DB] md5


> You are aware that md5() generates a 32 byte character string?
>
> Working on the 10 digit password request, have you alotted enough space in
> your database columns to cater to a 32 byte string (64 for multibyte)?
>
> BTW: md5 has eaten everything I've thrown at it ;-)
>
> ""bryan"" <[EMAIL PROTECTED]> wrote in message
> 005801c0a0f1$c5c3cd40$272478cc@bryan">news:005801c0a0f1$c5c3cd40$272478cc@bryan...
> I need some advice on this
> I am creating a random password through a function.
>
> This creates a random password and updates it in the database.
> The sql query works if I make it :
>
> $sql = "UPDATE members SET password='$password', verify='$verify' WHERE
> username='$username' ";
>
> but if I make the code (as below) with the md5, it does not.
> I must be doing something wrong, or it does not like to md5 random things
> or something.  Any Advice?
>
>   for ( $a=0; $a<1; $a++)  {
>
>   $password = newpwd( 10 );
>   $verify = $password;
>
>   $dbcnx = mysql_connect('localhost', 'bryan', 'fitch');
>   mysql_select_db( "playtime" );
>
>   $sql = "UPDATE members SET password=' ".md5($password)." ', verify='
> ".md5($verify)" ' WHERE username='$username' ";
>
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Resolution detect and redirect

2001-02-27 Thread Joe Brown

This feat will require a java script (not appropriate for php/db).

I saw something on a javascript site, perhaps www.webreference.com

gl

""Matthew Cothier"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >Why not just create a table that will resize to any resolution?
>
> Because I am using different sized images for the different resolutions as
> well as other page thingys.
>
> And I need the script for other things too.
>
> So can anyone help?
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] md5

2001-02-27 Thread Joe Brown

You are aware that md5() generates a 32 byte character string?

Working on the 10 digit password request, have you alotted enough space in
your database columns to cater to a 32 byte string (64 for multibyte)?

BTW: md5 has eaten everything I've thrown at it ;-)

""bryan"" <[EMAIL PROTECTED]> wrote in message
005801c0a0f1$c5c3cd40$272478cc@bryan">news:005801c0a0f1$c5c3cd40$272478cc@bryan...
I need some advice on this
I am creating a random password through a function.

This creates a random password and updates it in the database.
The sql query works if I make it :

$sql = "UPDATE members SET password='$password', verify='$verify' WHERE
username='$username' ";

but if I make the code (as below) with the md5, it does not.
I must be doing something wrong, or it does not like to md5 random things
or something.  Any Advice?

  for ( $a=0; $a<1; $a++)  {

  $password = newpwd( 10 );
  $verify = $password;

  $dbcnx = mysql_connect('localhost', 'bryan', 'fitch');
  mysql_select_db( "playtime" );

  $sql = "UPDATE members SET password=' ".md5($password)." ', verify='
".md5($verify)" ' WHERE username='$username' ";


Thanks

bryan

Bryan Fitch
Programmer
Concept Factory
[EMAIL PROTECTED]
http://www.concept-factory.com






-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Search engines & database driven sites

2001-02-27 Thread Roel Mulder

Hello Grant,
Well the thing with search engines is as AltaVista puts it very nicely:


Dynamic pages also block Web crawlers.
8><   8><   8><
Typically such pages have a question mark (?) in the URL. When a search 
engine crawler arrives at such a page, it captures the content but halts 
immediately, and will not follow the links, because it sees ahead of it an 
infinite number of pages -- a black hole that would bring it to a crash.


This came from http://doc.altavista.com/adv_search/ast_haw_wellindexed.html 
where you can find more useful tips.

So if you are passing variables in any way like 
http://www.site.com/dir/article.php?id=25 than these pages will simply not 
be indexed...
One way to deal with this is the following:

Build the link above like this:  http://www.site.com/dir/25.html this 
document doesn't exist.
In that directory you refer the 404's to article.php where you call 
getenv("REQUEST_URI")  and look, it says 25.html which you can then use to 
query the database and show that article :)

Roel

At 12:24 27-02-2001 +, you wrote:
>Greetings
>
>I'm not sure my question fits into the remit of this list - so apologies in
>advance if it's off track... Please point me in a more suitable direction is
>necessary!
>
>I recently converted my sites from hardwired HTML to a PHP/MySQL
>combination - with dynamic 'newsy' info held in a database, tailored for
>each visitor. Unfortunately the 'hit rate' from search engines has gone
>virtually to zero as Altavista, Hotbot etc. removed me from their indexes -
>they don't index .php files as far as I can see, and also don't follow links
>on php pages (I imagine it's the same for ASP, ColdFusion etc.). In contrast
>Google and All The Web have no problems with the .php extension (and even
>index my .pdf files!).
>
>I would be grateful for any wisdom on how best to deal with this. I could of
>course make an HTML intro page, but that would be a pity since I'd hardly be
>able to an intro page that conveys all the necessary info to bring the right
>visitors. Any advice on how to do this well? I could alternatively change
>the setting of the PHP parser to parse all .html as if it's php.
>Unfortunately I'm sharing a server right now and my ISP is unlikely to
>accept this because of the reduction in performance (I may be prepared to
>move to a dedicated server if necessary though). Lastly I thought of writing
>a PHP routine that, run once a day, will make a few HTML 'mirror' pages
>based on the content of the database to capture the search engine visitors.
>I could do that, but it seems to defeat the purpose of the dynamic pages
>somewhat... pity.
>
>Any other ideas? How do others deal with this issue?
>
>Regards
>Grant
>
>---
>Grant Ballard-Tremeer,
>HEDON Household Energy Network http://www.ecoharmony.net/hedon/
>eco Ltd. http://ecoharmony.com
>---
>
>
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

Mulder Technisch Advies
Postbus 69
NL-2740 AB  WADDINXVEEN
tel. 0182-640184 fax. 0182-640185
http://www.mta.nl


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] md5

2001-02-27 Thread bryan

I need some advice on this
I am creating a random password through a function.

This creates a random password and updates it in the database.
The sql query works if I make it :

$sql = "UPDATE members SET password='$password', verify='$verify' WHERE 
username='$username' ";

but if I make the code (as below) with the md5, it does not.  
I must be doing something wrong, or it does not like to md5 random things
or something.  Any Advice?

  for ( $a=0; $a<1; $a++)  {

  $password = newpwd( 10 );
  $verify = $password;
  
  $dbcnx = mysql_connect('localhost', 'bryan', 'fitch');
  mysql_select_db( "playtime" );
 
  $sql = "UPDATE members SET password=' ".md5($password)." ', verify=' ".md5($verify)" 
' WHERE username='$username' ";


Thanks

bryan

Bryan Fitch
Programmer
Concept Factory
[EMAIL PROTECTED]
http://www.concept-factory.com





RE: [PHP-DB] Resolution detect and redirect

2001-02-27 Thread Matthew Cothier

>Why not just create a table that will resize to any resolution?

Because I am using different sized images for the different resolutions as 
well as other page thingys.

And I need the script for other things too.

So can anyone help?
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] array awry

2001-02-27 Thread Darryl Friesen

> Perhaps I've misunderstood.
>
> I thought this IS a PHP list (see Rolf Hopkins below).

It's a PHP/Database list, not just PHP.  POsts should have something to do
with BOTH.

> Secondly, this list is not only for MySQL questions and issues (see Cal
> Evans below).  It is for all database questions, as we've seen from
> questins concerning other databases.

I think what he was getting at was the question had nothing to do with
databases; it was a question about arrays, and therefore should have only
been asked in php-general.


- Darryl

 --
  Darryl Friesen, B.Sc., Programmer/Analyst[EMAIL PROTECTED]
  Education & Research Technology Services, http://gollum.usask.ca/
  Department of Computing Services,
  University of Saskatchewan
 --
  "Go not to the Elves for counsel, for they will say both no and yes"



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] array awry

2001-02-27 Thread Rick Emery

All,

Perhaps I've misunderstood.

I thought this IS a PHP list (see Rolf Hopkins below).

Secondly, this list is not only for MySQL questions and issues (see Cal
Evans below).  It is for all database questions, as we've seen from uestins
concerning other databases.

Am I incorrect?

Richard L. Emery
IT Sr. Project Manager

"There is no 'trying'...
There is only 'Do' or 'Not Do' "


-Original Message-
From: Cal Evans [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 6:50 AM
To: Keith Spiller
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-DB] array awry


Hi Keith,

1: Don't cross-post. It's rude. Especially since this has nothing to do with
MySQL.

2: You are not building a multi-dimensional array. The code below won't even
build a single dimensional array because you didn't put your keys in quotes
so it's probably blowing chunks. At the very least, if you had put quotes
around your key names, it would have overwritten the data each loop.

Try something like this:

  If ($Selection == "3")
  {
  $lcvA++;
  $tabledata[$lcvA] = Array();
  $tabledata[$lcvA]['catid']= $myrow[0];
  $tabledata[$lcvA]['category'] = "$myrow[1]";
  $tabledata[$lcvA]['under']= $myrow[2];
  $tabledata[$lcvA]['corder']   = $myrow[3];
  $tabledata[$lcvA]['active']   = $myrow[4];
  }

This is a multidimensional array. The first dimension is a counter, $lcvA.
Make sure you init it at the top of your function.  Now, each time you add a
row to the array, it' in a new row IN the array.

To access the data you use:

$myCOrder = $tabledata[$rowToAccess]['corder']

HTH,
Cal
http://www.calevans.com

-Original Message-
From: Rolf Hopkins [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 9:10 PM
To: Keith Spiller; [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP-DB] Re: array awry


This is a PHP question and should really be asked on the PHP list.

But a suggestion.  Tried using field names instead of number?  ie.
$myrow["catid"];

I'd have to read up the PHP manual to find out for sure but I'm sure you can
do that just as well as I can.

-Original Message-
From: Keith Spiller [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 8:15 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP-DB] array awry


This associative array embedded within a function and declared as a global
at the start of the function, is meant to be a multidimensional array, but
with every loop of the while ($myrow = mysql_fetch_row($result)) statement,
it's previous values are replaced by the new ones.  Any ideas on how I can
fix this?

  If ($Selection == "3")
  {
  $tabledata[catid]= $myrow[0];
  $tabledata[category] = "$myrow[1]";
  $tabledata[under]= $myrow[2];
  $tabledata[corder]   = $myrow[3];
  $tabledata[active]   = $myrow[4];
  }

Keith
aka Larentium


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] unixODBC and Sybase ASE 11.9.2 on a linux box

2001-02-27 Thread Stefan Siefert

Hi,

we are trying the above combination, but we do not find any hints how
(which?) we configure an ODBC - Driver for Sybase in an odbc.ini file... if
anyone has experience with this combination we would be very glad if you
could post a small overview or a source, where we can find informations
about this combination...

thx

Stefan Siefert


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Resolution detect and redirect

2001-02-27 Thread Allsebrook_Richard/askr
 BDY.RTF

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


[PHP-DB] Resolution detect and redirect

2001-02-27 Thread Matthew Cothier

I am lookign for a piece of code that will detect the resolution of the user 
and return a page dependant on that i.e - The table will be adjusted to suit 
that.

Is there a script where I can detect what the resolution is, and also 
redirect to a page depending on what resolution they are using?

Thanks in advance for any help!
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] The dreaded 12154!!

2001-02-27 Thread Mark Farver

I'm assuming you're under Unix.  Make sure you can use sqlplus as the
webserver user (nobody under most Linuxes).  I had to add the Oracle_home
env variable to the system .profile script.  Also try setting Oracle_home
inside the httpd.conf script (SetEnv?) 

For windows users having the ORA-12154 error in PHP, upgrade to the Oracle
8.1.6 client, it seems to fix everything.  (Many, many, MANY thanks to the
user that suggested that, it saved me from having to port all my stuff
to ASP.)

Mark

On Mon, 26 Feb 2001, Kevin Porter wrote:

> Hi,
> 
> We're moving a web site to new servers. We've recreated the DB and imported
> all the data from the old
> database. I've compiled a new Apache/PHP (1.3.9 / 4.0.1pl2). tnsnames.ora is
> set up correctly as far as we
> can tell, but I'm _still_ getting the dreaded 12154 error.
> 
> We cannot see anything wrong. We've tried shutting down the web server, then
> the DB server and listener,
> then starting DB and listener, then starting Apache, but this has not
> worked.
> 
> We have $ORACLE_HOME set, and we can log into the DB perfectly OK with
> sqlplus (as oracle8i user).
> 
> Any ideas anyone?
> 
> thanks in advance,
> 
> - Kev
> 
> 
> --
> http://www.megasoccer.com - Global Soccer
> http://www.fa-premier.com - English Premier League Football
> 
> 
> 
> 

-- 
"The greatest dangers to liberty lurk in insidious enroachment by mean of
zeal, well-meaning but without understanding."
-- Justice Louis O. Brandeis, Olmstead vs. United States


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Can't connect to local MySQL server error

2001-02-27 Thread Rick Emery

MySQL is running; I can execute MySQL as ROOT.  The
/var/lib/mysql/mysql.sock file exists with read/write/execute permissions to
user/group/world.

Any other ideas are appreciated.

Thanks

rick

Richard L. Emery
IT Sr. Project Manager

"There is no 'trying'...
There is only 'Do' or 'Not Do' "


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 4:46 PM
To: Rick Emery; [EMAIL PROTECTED]
Subject: RE: [PHP-DB] Can't connect to local MySQL server error


Addressed to: Rick Emery <[EMAIL PROTECTED]>
  '[EMAIL PROTECTED]'

** Reply to note from Rick Emery <[EMAIL PROTECTED]> Mon, 26 Feb 2001
14:33:32 -0600
>   
> I tried:  Grant ALL ON *.* to user@localhost IDENIFIED BY "password";
> so as to provide access to all tables.  I should have stated that the
error
> I got was that I could not connect to the
> /var/lib/mysql/mysql.sock socket.

Make sure that MySQL is running, that the mysql.sock file exitst, in the
specified location, and that the permsiions on that file, and every
directory above it allow the user the web server runs as has read
and execute rights.  Note that execute for directories means that you
can cd to it, and has nothing about running programs from within it.


If the file is missing, try to find it  (locate)  and look in php.ini
for a setting to specify the correct location for your system.

Rick Widmer
Internet Marketing Specialists
http://www.developersdesk.com

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] Fatal error: Call to undefined function: () in add2.php on line 11

2001-02-27 Thread Robert

I had a similar problem ( on 2000 ) until created a usr directory at the
root ( C: )and put the mibs directory in it from the php directory

- Original Message -
From: "Joe Brown" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 27, 2001 12:19 AM
Subject: Re: [PHP-DB] Fatal error: Call to undefined function: () in
add2.php on line 11


> back to the drawing board...
>
> Re-compile php --with-mysql
>
> ""jim and lois flaherty"" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >   help , I have this problem
> >
> >I have redhat 7.0
> >mysql 3.23
> >and php-mysql rpm installed
> >
> >  my code
> >
> >  
> > 
> >Flaherty Family Page
> > 
> >  >
> > //  connect to server
> >
> > $mysql_link = mysql_connect("localhost", "user","password");
> >
> > $mysql_select_db("resume");
> >
> > $query = "insert into employer(name,add1,add2,city,state)";
> > $query = $query."values('$name','$add1','$add2','$city','$state')";
> >
> >
> > $mysql_result = mysql_query($query, $mysql_link);
> >
> >
> > my line 11 is mysql_connect
> >
> >
> > please let me know what I am doing wrong
> >
> > --
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] Search engines & database driven sites

2001-02-27 Thread Leon Letto

Here is an article by Tim Perdue.  Every time I lookup php stuff in google,
phpbuilder shows up so he must be doing something right.
http://www.phpbuilder.com/columns/tim2526.php3

Leon

-Original Message-
From: Grant Ballard-Tremeer [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 7:25 AM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Search engines & database driven sites


Greetings

I'm not sure my question fits into the remit of this list - so apologies in
advance if it's off track... Please point me in a more suitable direction is
necessary!

I recently converted my sites from hardwired HTML to a PHP/MySQL
combination - with dynamic 'newsy' info held in a database, tailored for
each visitor. Unfortunately the 'hit rate' from search engines has gone
virtually to zero as Altavista, Hotbot etc. removed me from their indexes -
they don't index .php files as far as I can see, and also don't follow links
on php pages (I imagine it's the same for ASP, ColdFusion etc.). In contrast
Google and All The Web have no problems with the .php extension (and even
index my .pdf files!).

I would be grateful for any wisdom on how best to deal with this. I could of
course make an HTML intro page, but that would be a pity since I'd hardly be
able to an intro page that conveys all the necessary info to bring the right
visitors. Any advice on how to do this well? I could alternatively change
the setting of the PHP parser to parse all .html as if it's php.
Unfortunately I'm sharing a server right now and my ISP is unlikely to
accept this because of the reduction in performance (I may be prepared to
move to a dedicated server if necessary though). Lastly I thought of writing
a PHP routine that, run once a day, will make a few HTML 'mirror' pages
based on the content of the database to capture the search engine visitors.
I could do that, but it seems to defeat the purpose of the dynamic pages
somewhat... pity.

Any other ideas? How do others deal with this issue?

Regards
Grant

---
Grant Ballard-Tremeer,
HEDON Household Energy Network http://www.ecoharmony.net/hedon/
eco Ltd. http://ecoharmony.com
---




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP-DB] array awry

2001-02-27 Thread Cal Evans

Hi Keith,

1: Don't cross-post. It's rude. Especially since this has nothing to do with
MySQL.

2: You are not building a multi-dimensional array. The code below won't even
build a single dimensional array because you didn't put your keys in quotes
so it's probably blowing chunks. At the very least, if you had put quotes
around your key names, it would have overwritten the data each loop.

Try something like this:

  If ($Selection == "3")
  {
  $lcvA++;
  $tabledata[$lcvA] = Array();
  $tabledata[$lcvA]['catid']= $myrow[0];
  $tabledata[$lcvA]['category'] = "$myrow[1]";
  $tabledata[$lcvA]['under']= $myrow[2];
  $tabledata[$lcvA]['corder']   = $myrow[3];
  $tabledata[$lcvA]['active']   = $myrow[4];
  }

This is a multidimensional array. The first dimension is a counter, $lcvA.
Make sure you init it at the top of your function.  Now, each time you add a
row to the array, it' in a new row IN the array.

To access the data you use:

$myCOrder = $tabledata[$rowToAccess]['corder']

HTH,
Cal
http://www.calevans.com


-Original Message-
From: Keith Spiller [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 26, 2001 8:15 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: [PHP-DB] array awry


This associative array embedded within a function and declared as a global
at the start of the function, is meant to be a multidimensional array, but
with every loop of the while ($myrow = mysql_fetch_row($result)) statement,
it's previous values are replaced by the new ones.  Any ideas on how I can
fix this?

  If ($Selection == "3")
  {
  $tabledata[catid]= $myrow[0];
  $tabledata[category] = "$myrow[1]";
  $tabledata[under]= $myrow[2];
  $tabledata[corder]   = $myrow[3];
  $tabledata[active]   = $myrow[4];
  }

Keith
aka Larentium


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DB] Search engines & database driven sites

2001-02-27 Thread Grant Ballard-Tremeer

Greetings

I'm not sure my question fits into the remit of this list - so apologies in
advance if it's off track... Please point me in a more suitable direction is
necessary!

I recently converted my sites from hardwired HTML to a PHP/MySQL
combination - with dynamic 'newsy' info held in a database, tailored for
each visitor. Unfortunately the 'hit rate' from search engines has gone
virtually to zero as Altavista, Hotbot etc. removed me from their indexes -
they don't index .php files as far as I can see, and also don't follow links
on php pages (I imagine it's the same for ASP, ColdFusion etc.). In contrast
Google and All The Web have no problems with the .php extension (and even
index my .pdf files!).

I would be grateful for any wisdom on how best to deal with this. I could of
course make an HTML intro page, but that would be a pity since I'd hardly be
able to an intro page that conveys all the necessary info to bring the right
visitors. Any advice on how to do this well? I could alternatively change
the setting of the PHP parser to parse all .html as if it's php.
Unfortunately I'm sharing a server right now and my ISP is unlikely to
accept this because of the reduction in performance (I may be prepared to
move to a dedicated server if necessary though). Lastly I thought of writing
a PHP routine that, run once a day, will make a few HTML 'mirror' pages
based on the content of the database to capture the search engine visitors.
I could do that, but it seems to defeat the purpose of the dynamic pages
somewhat... pity.

Any other ideas? How do others deal with this issue?

Regards
Grant

---
Grant Ballard-Tremeer,
HEDON Household Energy Network http://www.ecoharmony.net/hedon/
eco Ltd. http://ecoharmony.com
---




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP-DB] array awry

2001-02-27 Thread CC Zona

In article <061201c0a063$08eab5a0$[EMAIL PROTECTED]>,
 [EMAIL PROTECTED] ("Keith Spiller") wrote:

> This associative array embedded within a function and declared as a global at 
> the start of the function, is meant to be a multidimensional array, but with 
> every loop of the while ($myrow = mysql fetch row($result)) statement, it's 
> previous values are replaced by the new ones.  Any ideas on how I can fix 
> this?
> 
>   If ($Selection == "3")
>   {
>   $tabledata[catid]= $myrow[0];
>   $tabledata[category] = "$myrow[1]";
>   $tabledata[under]= $myrow[2];
>   $tabledata[corder]   = $myrow[3];
>   $tabledata[active]   = $myrow[4];
>   }


So what you're saying is that want indexes 'catid', 'category', etc. to 
have a distinct value for each row pulled from the database?  Then you need 
to add another dimension to that array.

-- 
CC

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]