[PHP-DB] TOO MANY CONNECTIONS!!

2002-10-23 Thread Georgie Casey
Im getting a too many connections error in my PHP pages at
http://www.free-ringtones.tv. I presume this is from the MySQL server, and I
know I access the database a lot for each page. So whats the solution to
this?? Write scripts that create static html pages that update every 20
minutes or so??

And was it the host that limited my connections???

TIA



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] mySQL settings

2002-08-17 Thread Georgie Casey

rite,
i run a web server and sell space to workers. my admin setup apache, mysql
and php with all the settings. each customers gets one sql db with a host
acc. the system runs ensim. but now i want one of my accounts do be able to
access the database of another, but it wont let me. what setting do i change
to allow me do this?

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Online Film Production Directory
***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] MySQL queries

2002-08-14 Thread Georgie Casey

for some reason in my mysql selecct statements in my php pages, when i
upload them to my web server, they just return a blank record set. no errors
or anything, just blank. i can insert fine but no select. it works fine on
my test win32 apache/mysql

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Online Film Production Directory
***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Mail problem

2002-08-04 Thread Georgie Casey

maybe use a for loop and mail command.
should work

Unknown Sender [EMAIL PROTECTED] wrote in message
002701c23924$da9b1e40$539f4dd5@administrator">news:002701c23924$da9b1e40$539f4dd5@administrator...
Sorry to be a little bit off topic.

I need a tool or script in PHP, that will automaticaly send e-mails to
receipients taken from database.
For example 1 the same e-mail to 1000 receipients. B

Mail server is on different machine.

Thanks in advance




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Auto Increment Problems....

2002-07-29 Thread Georgie Casey

why, is this question asked a lot??? anywa, thanks, i was gonna try
something like that from something i read in the mysql manual, but it only
mentioned it passing and didnt give an example or anything.

tanx

Daniel Brunner [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Once again...


 ALTER TABLE table1 AUTO_INCREMENT = 500


 Dan



 On Monday, July 29, 2002, at 10:44 PM, [EMAIL PROTECTED] wrote:

  rite,
 
  my primary key column (id) is set to auto_increment as usual which is
  very
  handy. But when I delete a row, the auto_increment just keeps
  incrementing
  and there's this 'hole' left where I deleted the row!
 
  Apart from this looking ugly, it poses another problem. In my PHP script
  where I can add new rows, I query the table, checking how many rows in
  the
  table altogether and set the new id as the next number, but this doesnt
  work
  if theres 'holes' in the id field, as the new record tries to overwrite
  another id.
 
  So I've 2 questions
  1) Can the next auto_increment value be 'set' by a SQL query
  2) Can I get a SQL query to INSERT INTO the first 'hole' it finds in
  the ID
  column??
 
  TIA
 
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Auto Increment Problems....

2002-07-29 Thread Georgie Casey

rite,

my primary key column (id) is set to auto_increment as usual which is very
handy. But when I delete a row, the auto_increment just keeps incrementing
and there's this 'hole' left where I deleted the row!

Apart from this looking ugly, it poses another problem. In my PHP script
where I can add new rows, I query the table, checking how many rows in the
table altogether and set the new id as the next number, but this doesnt work
if theres 'holes' in the id field, as the new record tries to overwrite
another id.

So I've 2 questions
1) Can the next auto_increment value be 'set' by a SQL query
2) Can I get a SQL query to INSERT INTO the first 'hole' it finds in the ID
column??

TIA



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] ORDER BY from 2 tables

2002-07-29 Thread Georgie Casey

i assume this is a simple question...

how can I SELECT * FROM 2 different tables in the same query, ORDER BYing
the 'hits' column, which both tables have.

eg, 2 tables i have are similiar and i want to merge them and then select
everything ordering by hits



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] SQL order by queries

2002-07-26 Thread Georgie Casey

Can you d arithmetic division on two fields in an ORDER BY??

eg
SELECT * FROM table_name ORDER BY field1 / field2 DESC

Can it be done?

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Online Film Production Directory
***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] another problem

2002-07-22 Thread Georgie Casey

well, i solved the last problem on my own but now i need help on my new one
:-)

how do you convert text to hexadecimal with PHP?

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Online Film Production Directory
***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Hex Help Please...

2002-07-21 Thread Georgie Casey

Rite,

There's a PHP script that takes a monochrome BMP and converts it into some
sort of hex code and I've noticed some patterns with this code. This image
is 72 pixels wide by 14 high so there's 1008 pixels. In the code returned,
theres 252 chars, which is 1008 divided by 4.

So I guessed the image is split into 4 pixels each. So if I pass an image
with the first pixel black and everyhting else white, it returns 8 for those
4. If I pass an image with the first and second black, it returns c.

With the first three black, it returns e. With the first 4, f. And if I have
the 5th pixel black it goes onto the next char code, eg returning f for the
first 4 pixels, then 8 for the 5th pixel black, ie the first pixel in the
next 4. In total it returns f8.

PS
I tried reading in each pixel of the script, checking if it was black or
white, 1 for black, 0 for white. Then converting these 0s and 1s from
decimal to hex, then converting from binary to hex, but to no avail. Then I
tried taking a set of 4 1s or 0s and converting them, but still no luck.

So my questions is, does anyone know how theyre encoding the image I
could probably could decipher the coding with some experimentation but it
really looks like hex and I might be wasting my time.

TIA







-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Re: Hex Help Please...

2002-07-21 Thread Georgie Casey

OK, i thought I found my solution but...

How come if I convert from 1000 from Binary to Hex in calculator, it
returns 8, but when I use the PHP bin2hex function, it returns loads of 3s
and 0s


Georgie Casey [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 Rite,

 There's a PHP script that takes a monochrome BMP and converts it into some
 sort of hex code and I've noticed some patterns with this code. This image
 is 72 pixels wide by 14 high so there's 1008 pixels. In the code returned,
 theres 252 chars, which is 1008 divided by 4.

 So I guessed the image is split into 4 pixels each. So if I pass an image
 with the first pixel black and everyhting else white, it returns 8 for
those
 4. If I pass an image with the first and second black, it returns c.

 With the first three black, it returns e. With the first 4, f. And if I
have
 the 5th pixel black it goes onto the next char code, eg returning f for
the
 first 4 pixels, then 8 for the 5th pixel black, ie the first pixel in the
 next 4. In total it returns f8.

 PS
 I tried reading in each pixel of the script, checking if it was black or
 white, 1 for black, 0 for white. Then converting these 0s and 1s from
 decimal to hex, then converting from binary to hex, but to no avail. Then
I
 tried taking a set of 4 1s or 0s and converting them, but still no luck.

 So my questions is, does anyone know how theyre encoding the image I
 could probably could decipher the coding with some experimentation but it
 really looks like hex and I might be wasting my time.

 TIA









-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Searching...

2002-07-18 Thread Georgie Casey

in ym search page, i construct a sql query from user input to search my
database, and i run this query to get totalresults. Then run another query
with a LIMIT 0, 30 ending for each page. So I'm running 2 mySQL queries per
page. My question is, is this inefficient? is there any better way i dont
know of? or does the 2 queries not mka emuch of a difference

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Online Film Production Directory
***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Emulating HTTP File Uploads

2002-06-21 Thread Georgie Casey

Does anyone know how to upload a file through PHP through the HTT interface.
I use fopen() to open remote php scripts using the GET method for non-file
uploads but it doesnt work with HTTP POST or file uploads.

Does anyone have any ideas?

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Online Film Production Directory
***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Unique SQL query?????????????

2002-06-07 Thread Georgie Casey

Is there any SQL command that will return a list of *unique* entries from a
fied. ie only repeat one for duplicates

i have a database of products, each having a category, and obviously a lot
of products have the same category and I want to create an index of all the
different categories.
 thanks

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Online Film Production Directory
***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Simulating a FORM POST thing (HELP!)

2002-05-26 Thread Georgie Casey

Rite, when you see a web form, you know you can simulate the submit by
filling in the values in the address field, just like a GET method, and it
usually works the exact same. But how do you do it when one of the fields in
the form is a file upload?!?!?!

For the record, its a GIF file you've to upload. Is there any way to do this
in PHP??





-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Temporary MySQL Tables

2002-03-21 Thread Georgie Casey

Hi,

On my site now, there's a lengthy register process where the user has to
fill in 5 forms, one after the another. I get the PHP script to echo the
values from the previous into the next form by using
?php echo input type=\hidden\ name=\name\ value=\ . $name . \;
?
for example. Then I keep carrying the information over to each extra form
until the user reaches the last page and I insert all the info into a table
called tempmembers with an extra timestamp field which I use to verify
email addresses. The user gets an email saying click here to verify your
membership with the username and timestamp in the URL. The users clicks it,
and I run a SQL command that copies the row from tempmembers into the
members table.

This process worked well for a while until I discovered if users enter a
single or double quote into any of the fields, it fecks everything up. So I
added an addslashes command but it's all getting a bit hairy so I was
looking for some advice on MySQL temporary tables for either using after
every form or at the end of all the forms.

Or does anyone have any other method I could use??? Thanks for any help
you might have.



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP-DB] Random Selecting from mySQL

2002-03-13 Thread Georgie Casey

I know how to use the ORDER BY rand() command on the end of queries to
randomize selection, but that's no good when you want to only display 10
results per page. The next page the user chooses, randomizes again and could
show duplicate fields and not at all show other fields.

Does anyone know a way round this?

--
Regards,
Georgie Casey
[EMAIL PROTECTED]

***
http://www.filmfind.tv
Ireland's Online Film Production Directory
***



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Random Selecting from mySQL

2002-03-13 Thread Georgie Casey

yea, i know how to display 10 results per page, but that doesnt work when
you want to do a ORDER BY rand() query.

Gurhan Ozen [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 are you just looking for a way to display 10  results per page? If yes
then
 you can just use LIMIT to limit your result to 10 .. So, for the first
page,
 you can do SELECT  LIMIT 1, 10; and for the second page SELECT ...
 LIMIT 11, 20 etc etc .
   You can sure use ORDER BY with LIMIT to to sort the results for a
 given criteria ..

 Gurhan


 -Original Message-
 From: Georgie Casey [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, March 13, 2002 2:00 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Subject: [PHP-DB] Random Selecting from mySQL


 I know how to use the ORDER BY rand() command on the end of queries to
 randomize selection, but that's no good when you want to only display 10
 results per page. The next page the user chooses, randomizes again and
could
 show duplicate fields and not at all show other fields.

 Does anyone know a way round this?

 --
 Regards,
 Georgie Casey
 [EMAIL PROTECTED]

 ***
 http://www.filmfind.tv
 Ireland's Online Film Production Directory
 ***



 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php