RE: [PHP-DB] how to hide source code??

2002-08-29 Thread Adam Williams

Apache can execute a file without reading it.  Don't believe me?  Make a
file 701 and then open it in apache.

Adam

On 29 Aug 2002, Mateus Cordeiro Inssa wrote:

 Em Qui, 2002-08-29 às 16:05, Adam Williams escreveu:
  oh yeah duh me, set it 701
 
  Adam
 
  On Thu, 29 Aug 2002, Ryan Jameson (USA) wrote:
 
   Wouldn't that make php unable to read it as well? Then it is useless as well.

   Oh, please, setting x bit will permit what ? PHP has to READ the
 file to execute it.

   And, if the admin has root privileges, what you can do to prevent him
 to view the file (a plain text php file) ?

   One simple thing to do is to make the source so difficult to
 understand that people would consider it unreadable. I think the right
 term is to obfuscate the code. There is programs to do this to C, Perl,
 Tcl, etc., but I don't know if there is one for PHP.

   Encryption is not enough because PHP would need to decrypt it.

   Hmm, and if you make a PHP module (binary) and use its functions from
 the PHP plain text file ?




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




RE: [PHP-DB] how to hide source code??

2002-08-29 Thread Adam Williams

I encourage you to create a file whatever.html and set it 701 and then
look at it with a browsing by connecting to your webserver.

http://server.com/~user/whatever.html will be displayed even though it is
701.  I've done it many times.

Adam

On 29 Aug 2002, Mateus Cordeiro Inssa wrote:

 Em Qui, 2002-08-29 às 17:48, Adam Williams escreveu:
  Apache can execute a file without reading it.  Don't believe me?  Make a
  file 701 and then open it in apache.

   Oh, yes, so can apache bypass the kernel ? I don't think so, unless it
 is running as root  or the file gets owned by the same user apache
 runs.

   The x bit means the O.S. will try to execute that file. Your
 argument it's like to say setting the x bit in .doc documents permit
 or not its reading.

   The x could do something usefull to cgi's, they are really executed
 (by execve system call).




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




[PHP-DB] Re: [mysql] freeing resources

2002-09-02 Thread Adam Royle

Yes, PHP is very cool, and handles memory management for you.

mySQL resultsets and connections are cleaned up once the page has finished executing 
(is in manual).

The reason why you would want to use these functions is if you have a script that does 
not finish (such as one that handles port access from the command line).

Adam



Re: [PHP-DB] PHP Editor?

2002-09-06 Thread Adam Williams

1:

http://quanta.sourceforge.net/

2:

yes

Adam
On Fri, 6 Sep 2002, Bryan McLemore wrote:

 First off, What html/php editor do you guys think is better?

 Secondly, perhaps a little more relevant to the database part of this.  I just want 
to clarify that with mysql_query() I can send any valid sql expression and it will do 
that?

 -Bryan



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




Re: [PHP-DB] SQL Query

2002-09-06 Thread Adam Williams

id INT NOT NULL AUTO_INCREMENT PRIMARY KEY

Adam

On Sat, 7 Sep 2002, Bryan McLemore wrote:

 Hi Guys I have written this SQL Query :

 CREATE TABLE tasks (id INT AUTO_INCREMENT, name VARCHAR(50), desc TEXT, address 
VARCHAR(50), startDate DATE, lastWork DATE, progress INT(3))

 I'm sending it in through php and I can't get it to work correctly.  Please help.  
Also, I would like to make id the primary key/index

 -Bryan



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




Re: [PHP-DB] Apache 2.X and PHP

2002-09-07 Thread Adam Williams

Yes but support is experimental so you may notice strange behavior.

Adam

On Sat, 7 Sep 2002 [EMAIL PROTECTED] wrote:

 Is it possible to run Apache 2.X with PHP?



 Julio Cuz, Jr.

 [EMAIL PROTECTED]

 Information Services

 Riverside Community College

 mailto:[EMAIL PROTECTED]






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




[PHP-DB] Re: assist with SORT array

2002-09-10 Thread Adam Royle

Bartosz was correct in saying that you should use your query to sort, 
rather than sorting array. And the array is actually sorted, although 
it keeps its index. See the manual reference on arrays to see how they 
work. To iterate over sorted arrays, use the foreach() construct.

Anyway, the better way to do it (using only 1 sql query), would be 
using the following code.

$rest_IDs = implode(',', $restaurants);
$sql = SELECT name FROM restaurants WHERE id IN ('$rest_IDs') ORDER BY 
name;
$result = mysql_query($sql) or die($sql . mysql_error());
while($row=mysql_fetch_object($result)) {
  $rest_array[] = ucwords(stripslashes($row-name));
}



And its sorted!!! If you want to check what values an array holds, use 
a combination of header(Content-Type: text/plain); and 
print_r($rest_array);

Have fun!

Adam


 I  have a head scratcher.. prob just a glitch on my side, but somehow 
 I am confused with the results.

 I have a php script pulling from a mysql database for id/names which 
 is getting choices through a check box form. All of that works just 
 fine, but I wanted to display the results sorted by title. My snippet 
 of code is:

 // $restaurants = array() of ids back from form
 for($i=0;$isizeof($restaurants);$i++) {
 $rest_id = $restaurants[$i];
 $sql=select name from restaurants where id=$rest_id;
 $result=mysql_query($sql) or die($sql . mysql_error());
 while($row=mysql_fetch_object($result)) {
 $rest_name .= ucwords(stripslashes($row-name)) . ;;
 }
 }
 $rest_array=explode(;,$rest_name);

 $rest_sort=sort($rest_array); // -- the problem line

 die(checking: $rest_namebrbr size = .sizeof($rest_array) 
 .  sorted:  . sizeof($rest_sort));

 the results come back with 6 in the $rest_array but only 1 in the 
 $rest_sort array! How is that??

   checking: Hi-Ho Tavern;Village Inn;Speak Easy;Duane's House Of 
 Pizza;Atomic Coffee;
   size = 6 sorted: 1

 What I am trying to accomplish is an array('Atomic Coffee', 'Duane's 
 House Of Pizza','Hi-Ho Tavern','Speak Easy','Village Inn')

 Help??


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




Re: [PHP-DB] PHP in a javascript function with DB calls.

2002-09-10 Thread Adam Voigt

Umm, the body tag in HTML has an onLoad parameter.
So:

body bgcolor=black onload=javascript:window.new('url');

That code for the window.new is probably wrong, but that will do it.

Adam Voigt
[EMAIL PROTECTED]

On Tue, 2002-09-10 at 11:20, Aaron Wolski wrote:
 Hi All,
 
 I HOPE this is the right place for this.. if not I am sorry!!!
 
 
 
 I'm hoping someone can put me on a clear path of how to do what I am
 asking here.
 
 I Have a shopping cart... and in this shopping cart I want to feature
 some items in a pop_up window when the user is ready to check out - if
 they are not already selected.
 
 For example.. Someone buy a Hockey Stick but don't buy hockey tape..
 
 when when they go to check out.. I want a pop_up to be launched asking
 the user if they want to add Hockey tape to their order for onlu $$$.
 
 For this to happen I need to have an onLoad on the checkout page that
 calls a javascript function that has PHP code to find out IF a
 paritcular product is selected to see if the other has been selected
 too, if it's NOT selected then launch the pop_up.
 
 Does ANYONE have any idea's as to how this can be accomplished??
 
 Anyhelp is appreciated
 
 thanks all.
 
 Aaron
 



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




Re: [PHP-DB] php start-stop howto?

2002-09-12 Thread Adam Williams

look in /etc/httpd/conf/httpd.conf

when you restart apache (/etc/rc.d/init.d/httpd restart) it restarts php
because php is called by apache.

Adam

On Thu, 12 Sep 2002, Warren Massengill wrote:

 RedHat Linux 7.2 RPM installation included:
 PostgreSQL 7.1.3
 PHP 4.0.6

 Had no problem creating a database using pg but can't find the on/off button
 for php.

 PHP is installed in /usr/bin/php; /etc/php.ini; /usr/share/php

 I edited the php.ini file to specify a location for;
 usr_dir =

 The manual for PHP 4.2 (I have 4.0) suggested uncommenting  extra module
 lines in http.conf. I don't know if that is an Apache, Linux or PHP file,
 but I can't find it in any of them.

 If I just start typing the hello world script linux wants to execute it
 after the first line. Put the entire script in an executable file and it
 doesn't like that either.

 What do I do next?

 Thanks,
 Warren



 _
 MSN Photos is the easiest way to share and print your photos:
 http://photos.msn.com/support/worldwide.aspx





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




Re: [PHP-DB] to determine how much server space left on the webserver?

2002-09-17 Thread Adam Williams

?php

exec(df -h);

?

On Tue, 17 Sep 2002, Bo wrote:

 Any ideas of how to write a php script to determine the disk space left in
 my account at my web server?






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




Re: [PHP-DB] to determine how much server space left on the webserver?

2002-09-17 Thread Adam Williams

actually make that system(df -h);



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




Re: [PHP-DB] Re: onnecting to MSSQL database from Linux?

2002-09-17 Thread Adam Williams

He's using microsoft sql server, not mysql.

try --with-mssql

maybe?
Adam

On Wed, 18 Sep 2002, Jason Morehouse wrote:

 It means you haven't compiled mysql support into php.  Recompile it using
 --with-mysql

 --

 Jason Morehouse (jm[@]netconcepts[.]com)
 Auckland, New Zealand

 Linux: Because rebooting is for adding hardware.

 On Tue, 17 Sep 2002 15:30:29 +, Avi Schwartz wrote:

  I have PHP4 and freetds installed and I am trying to connect to a mssql
  server.  The problem I am having is that the mssql_connect() call generates
  the following error:
 
  Fatal error: Call to undefined function: mssql_connect()
 
  Is there something I need to require?
 
  Thanks,
  Avi





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




[PHP-DB] Re: password function

2002-09-24 Thread Adam Royle

When using aggregate functions in sql, it is good to name that expression
using the AS keyword.

Try this:

$result = mysql_query(select password(.$_POST['password'].) AS pword);
while ($p = mysql_fetch_array($result, MYSQL_ASSOC)){
$pswrd=$p['pword'];
}


Also, like David said, you should also have exception handlers (need not be
advanced). If you're like me and hate having to type too much, chuck your db
stuff in a function. A very simple one would be doing this (this is not
tested, by the way):

function query($sql){
return mysql_query($sql) or die(Error: . mysql_error());
}

Then to call it, simply

$sql = select password(.$_POST['password'].) AS pword;
$result = query($sql);

Adam


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




Re: [PHP-DB] Mysql vs postgresql

2002-09-24 Thread Adam Alkins

 Hi peoples,

 The company I'm about to partner with for hosting my websites is using
 postgresql for their database server.  I currently use mysql for all of
 mine.

 What I'm trying to find out is peoples experiences using postgresql, any
 plusses or minusses, is it worth using these guys or finding another
company
 that will use mysql instead?

 Most of the sites are being rewritten at the moment anyway so changing the
 code isn't really a factor for me.

 Thanks in advance,

 -gav.

This comparation is a bit old but I think a lot still applies

http://www.phpbuilder.com/columns/tim2705.php3

--
Adam Alkins
http://www.rasadam.com
--



Re: [PHP-DB] Current row of query

2002-09-26 Thread Adam Williams

why not

if (!($1%2))
{
echo even!;
}
else
{
echo odd!;
}

Adam

On Thu, 26 Sep 2002, Brad Bonkoski wrote:

 oops...

 I meant:
 (if $i is odd)
 ...

 because $i would be the current index in the array.


 Brad Bonkoski wrote:

  why not this?
 
  $result = mysql_query(Select * from table');
  $num_rows = mysql_num_rows($rows);
 
  for ($i=0; $i$num_rows, $i++)
  {
  $row = mysql_fetch_array($result);
  if ($num_rows is odd)
  {
  print $row with BG color of red;
  }
  else
  {
  printf $row with BG color of purple;
  }
  }
 
  HTH
  -Brad
 
  Patrick Lebon wrote:
 
   Is there a mysql or array variable for the current row of a query array?
   I want to alternate background colours for each row of the query output so i
   need to know the current row number.
  
   Thanks
  
   --
   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 Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP-DB] Noob questions...

2002-10-02 Thread Adam Williams

search around for phpmyadmin on google

Adam

On Wed, 2 Oct 2002, Brett Lathrope wrote:


 Ok, here's my scenario...

 My Web Host has all Root Admin control over MySQL and PHP configs (but they
 are setup well no complaints there)...I simply have access to 1 DB (already
 created) that I can do what I want with (create/delete/update tables).

 I'm VERY comfortable in Windows, C/C++, Delphi and SQL.  But I'm a noob to
 Unix/Linux, as well as both MySQL and PHP.

 I have two books and the online manuals and I'm reading them...unfortunately
 almost ALL of them assume you have Root Admin (as well as build) privileges.

 Can someone recommend a MySQL Front End, that a) is free and b) a noob can
 set up and finally c) allows me to work from a client on MySQL DB on my Web
 Host?

 Thanks Brett







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




Re: [PHP-DB] I need Microsoft SQL Library: mssql70.so

2002-10-02 Thread Adam Voigt

You need the FreeTDS connection library (it works wonders for us):

Goto www.freetds.org
Download it
Configure, make, make install it
Edit your freetds config file to your needs
Add the --with-sybase=/path/to/freetds to your PHP configure line

yes, I know that says sybase, but trust me, it works.

Adam Voigt
[EMAIL PROTECTED]

On Wed, 2002-10-02 at 12:48, Leo Hotmail wrote:
 
 
 I've installed Linux Red Hat 7.1  with php 4 and have the this libraries in 
/usr/lib/php4
 
  pgsql.so
  ldap.so
  imap.so
 
 but I need Microsoft SQL Library: mssql70.so
 
 how can I install it?
 
 Leo
 



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




[PHP-DB] Advanced search scripts

2002-10-08 Thread Adam Royle

I was wondering if anyone has some resources (links or scripts) on 'advanced site 
searches'. Something that is similar to the way regular search engines process 
requests. 

ie.   phrase or two word +required -not included

Also, returning details of that search, say for example returning 10 words before and 
10 words after and displaying it in search results. The ability to search similar 
words (eg. ignoring punctuation) would be cool aswell.

I am interested in this for database (all text fields), and also searching text files 
on filesystem.

Now, I'm not trying to recreate Google or anything, and this is just for my own 
research (at this time), but I eventually would like to be able to create a smarter 
site searching engine.

Can anyone give suggestions? or any links to tutorials (or books)

I have used regex a little bit before, but not in PHP (only ASP and JavaScript).

Adam



Re: [PHP-DB] Advanced search scripts

2002-10-09 Thread Adam Royle

Well, for this example, you could use mySQL, but really, I would be 
looking to utilise this on any database. Personally, I don't think this 
would be database dependent (unless you have other ideas).

Adam

On Wednesday, October 9, 2002, at 08:46  PM, John W. Holmes wrote:

 What database are you using?

 ---John Holmes...

 -Original Message-
 From: Adam Royle [mailto:[EMAIL PROTECTED]]
 Sent: Wednesday, October 09, 2002 2:09 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] Advanced search scripts

 I was wondering if anyone has some resources (links or scripts) on
 'advanced site searches'. Something that is similar to the way regular
 search engines process requests.

 ie.   phrase or two word +required -not included

 Also, returning details of that search, say for example returning 10
 words
 before and 10 words after and displaying it in search results. The
 ability
 to search similar words (eg. ignoring punctuation) would be cool
 aswell.

 I am interested in this for database (all text fields), and also
 searching
 text files on filesystem.

 Now, I'm not trying to recreate Google or anything, and this is just
 for
 my own research (at this time), but I eventually would like to be able
 to
 create a smarter site searching engine.

 Can anyone give suggestions? or any links to tutorials (or books)

 I have used regex a little bit before, but not in PHP (only ASP and
 JavaScript).

 Adam





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




[PHP-DB] Re: Accessing data from next row? (mysql)

2002-10-14 Thread Adam Royle

Create an array and go through the array as needed.

Here is some code from one of my db functions:

$DB_RESULT = mysql_query($sql) or die(Error executing query:  . 
mysql_error());

// create an empty array to fill with data
$arrData = array();

$rowCount = 0;
while ($r = mysql_fetch_array($DB_RESULT, MYSQL_ASSOC)){
foreach ($r as $key = $value){
$arrData[$rowCount][$key] = $value;
}
$rowCount++;
}

then simply instead of your code:
while($array = mysql_fetch_array($result)){

use this:
for ($i=0;$icount($arrData);$i++){
$arrThisRow = $arrData[$i];
$arrNextRow = $arrData[$i+1];
}

obviously, if you are trying to access a variable which index does not 
exist, you will need to implement some sort of error checking, etc

adam


 Using mysql, how do I access the data of the next row using code
 something like this:
 $result = mysql_query(select column from table where 
 whatever='whatever');
 while($array = mysql_fetch_array($result)){
 //Whatever
 }


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




[PHP-DB] Re: Accessing data from next row? (mysql)

2002-10-14 Thread Adam Royle

Also, if you're not sure how to get the values from $arrThisRow / 
$arrNextRow:

echo $arrThisRow['columnName'];

or $arrData[$i]['columnName'] if you want to access it manually without 
the other two arrays

adam

On Monday, October 14, 2002, at 06:05  PM, Adam Royle wrote:

 Create an array and go through the array as needed.

 Here is some code from one of my db functions:

   $DB_RESULT = mysql_query($sql) or die(Error executing query:  . 
 mysql_error());

   // create an empty array to fill with data
   $arrData = array();

   $rowCount = 0;
   while ($r = mysql_fetch_array($DB_RESULT, MYSQL_ASSOC)){
   foreach ($r as $key = $value){
   $arrData[$rowCount][$key] = $value;
   }
   $rowCount++;
   }

 then simply instead of your code:
 while($array = mysql_fetch_array($result)){

 use this:
 for ($i=0;$icount($arrData);$i++){
   $arrThisRow = $arrData[$i];
   $arrNextRow = $arrData[$i+1];
 }

 obviously, if you are trying to access a variable which index does not 
 exist, you will need to implement some sort of error checking, etc

 adam


 Using mysql, how do I access the data of the next row using code
 something like this:
 $result = mysql_query(select column from table where 
 whatever='whatever');
 while($array = mysql_fetch_array($result)){
 //Whatever
 }



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




[PHP-DB] .htaccess and db authentication

2002-10-14 Thread Adam Royle

I was wondering about people's thoughts on file security through php 
using database authentication.

Take the following example:

I have a folder (in webroot) called /videos/ which contains a heap of 
files like so:

video_1_14-06-2002.mpg
video_2_15-06-2002.mpg
video_3_16-06-2002.mpg
video_4_17-06-2002.mpg

Now, in a database I have table with a heap of users, with some sort of 
security identifier which allows them to access only the files they are 
given access to. Now, doing this in PHP is no problem, but I want to be 
able to stop them from 'predicting' what the next filename would be and 
just typing that in.

I thought about using .htaccess, where if they try to access one of the 
files, it sends it off to a php page which authenticates and displays a 
list of files they are allowed to view, although I would like it if 
they had the opportunity to type in the url of the file if they are 
actually authorized to do so.

I would prefer not to keep a file listing of allowed usernames and 
passwords using .htaccess, as this information could potentially be 
updated frequently with a large amount of users (or would this not be a 
problem).

Has anyone implemented this type of system before? are there any good 
resources people know of for this type of thing?

Thanks,
Adam.


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




[PHP-DB] Re: [PHP] problem with informix

2002-10-21 Thread Adam Williams
I'd go back to apache 1.3.27 and php-4.2.3 if I were you and see if that
fixes your problem.

I run Informix, PHP, and Apache on a server and have had no problems.

Adam

On Mon, 21 Oct 2002, Erwin Speybroeck wrote:

 Hi,

 I'm struggling with a problem for quite some time.
 I have a webserver with apache-1.3.22, php 4.0.6 (patched for some security issues), 
informix ESQL 9.30 and a databaseserver with Informix IDS 7.31. This construction 
works very fine.

 As soon as i go to newer versions -- last try : httpd-2.0.43, php-4.2.3, with the 
same informix configuration the problem appears. Everything went well for about a 
week -- so it lloks ok, but ...

 On the databaseserver shared memory gets taken by the php-actions on the webserver 
and at a certain moment this memory is all used and the server (database) crashes.

 Is there somebody who has experienced a similar problem or is there somebody who can 
give some hints in the direction to look for ???

 Thanks in advance,

 Erwin Speybroeck
 [EMAIL PROTECTED]
 Neem eens een kijkje op onze website -- www.vrv.be



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




Re: [PHP-DB] MySQL password protection?

2002-11-07 Thread Adam Voigt
Make the include file (or wherever your page with the pass is)
encrypted, see ioncube.com they charge by the amount of code you
incrypt, for a simple database include file, I think it would
be $1 or less.

On Wed, 2002-11-06 at 16:04, William Trappeniers wrote:
 Hi all
 
 I was wondering if it is possible to protect my password to the MySQL-server
 from being in a PHP-script.  Now I can't do that, so everybody who gets to
 see my php-sourcecode also can see my (not protected/not encrypted)
 password.
 How can I change this?
 
 Thanks,
 
 William
 
 ---
 William Trappeniers
 mail at: [EMAIL PROTECTED]
 
 
 
 -- 
 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




Re: [PHP-DB] first Array value duplicating..

2002-11-07 Thread Adam Voigt
Ok, here's how I do it: =)

Delete checkbox's (assuming this is being called recursively, once
for each row in the db):

input type=checkbox name=delete[] value=$row[id]

And on submition:

foreach($_POST[delete] AS $row)
mysql_query(DELETE FROM tablename WHERE id = '$row';);

Adam Voigt
[EMAIL PROTECTED]

  Hi All,
 
 
  In a form I have checkboxes associated with order records. The
  checkboxes are for deleting order records (should a client choose to do
  so).
 
  It looks like this:
 
  form name=form action=process_bank.php method=POST
  input type=hidden name=order_index[0] value=1
  td class=cartlink align=centerinput type=checkbox
  name=delete[0] value=1/td
  input type=hidden name=order_index[1] value=3
  td class=cartlink align=centerinput type=checkbox
  name=delete[1] value=1/td
  input type=hidden name=order_index[2] value=8
  td class=cartlink align=centerinput type=checkbox
  name=delete[2] value=1/td
  input type=hidden name=order_index[3] value=12
  td class=cartlink align=centerinput type=checkbox
  name=delete[3] value=1/td
  /form
 
  Now.. when the process button is pressed the information is carried off
  to the process_bank.php script.
 
  Lets assume for this example.. I selected the checkbox delete[0] (which
  equals value 1) and delete[3] (which equals value 12).
 
  In the script I have this code:
 
  for ($i=0;$isizeof($order_index);$i++) {
 
 $orderQuery = db_query(SELECT id FROM TestOrderTable WHERE
  id=.$order_index[$i]);
 $orderResult = db_fetch($orderQuery);
 
 if ($delete[$i] == 1) {
 
  $ids .= $orderResult[id];
 
  echo $ids;
 
 
 }
  }
 
  The echo'd value that I get is 1,1,12 when it should be 1,12.
 
  When only ONE checkbox is selected I just get the one value displayed
  (i.e. if I selected the first checkbox the echo'd value would be 1).
 
  Does anyone know why the first value is being duplicated on a multiple
  select but not on a single select?
 
  Sorry if this sounds confusing :(
 
  Aaron
 
 
 -- 
 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] Re: Having more than one id in the same field

2002-11-10 Thread Adam Atlas
Perhaps you could store all of the IDs in a varchar type (I'm assuming 
you're using some SQL database or another) separated by spaces or 
colons or anything else that wouldn't be in an ID. Then you can get the 
separate IDs by Exploding the result in PHP. That's probably not the 
best way to do this, but it's the first way I can think of.

Hi. I have a database designing question to ask.
I want to build a table of events. Among the other fields there must 
be a
field that holds the 'responsible organization' of the event. This
organization of course will be responsible for other events as well so 
I
have to create another table that holds the organizations (id, name, 
phones,
director etc) and then just pull the organization id to the events 
table.
The problem is that it happens too often to have 2 organizations 
responsible
for the same event so I'll have to add them both to the events table 
in the
same record.

How do you advice me to do that?
I thought that I could use a text field to hold the ids and then when
searching the database just change the MySQL command from
...where events.id='$id'... (As it would be if only one id was going 
to be
used) to
...where '$id' in (events.ids)... or maybe something using LIKE.

Do you think it can be done this way? Apart from the responsible
organization I may have other fields in the same table having the same
problem (for example: the event visitors are staying in one hotel and 
I want
to hold control of the hotels as well. Maybe 2 hotels are used instead 
of
one). If I solve my problem this way, do you think that it will be too
difficult or 'heavy' to have more than one condition like this in my
queries?
Do you think of any other way?

Thanx in advance
Achilles

--
Adam Atlas

Your mouse has moved. Windows has to reboot for changes to take effect. 
[ OK ]


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



Re: [PHP-DB] sql select

2002-11-12 Thread Adam Williams
Have you ran it by hand in MySQL from the command prompt with some test
data and gotten an error?

Adam

On Tue, 12 Nov 2002, Steve Dodkins wrote:

 if i have a statement

 $result = mysql_query(SELECT
 labor_id,labor_ord_no,labor_wkyr,works_orders_part_no,works_orders_qty,works
 _orders_customer_id,labor_qty,labor_time,labor_qty*parts_time+parts_setup AS
 timea FROM labor,works_orders,parts WHERE labor_ord_no=works_orders_ord_no
 AND works_orders_part_no=parts_no AND time2 = labor_wkyr ORDER BY
 labor_wkyr,works_orders_ord_no,$link);

 This works fine but if i add AND timea  labor_time it fails



 Regards

 Steve Dodkins

 IMPORTANT NOTICE The information in this e-mail is confidential and should
 only be read by those persons to whom it is addressed and is not intended to
 be relied upon by any person without subsequent written confirmation of its
 contents. ebm-ZIEHL (UK) Ltd. cannot accept any responsibility for the
 accuracy or completeness of this message as it has been transmitted over a
 public network.   Furthermore, the content of this e-mail is the personal
 view of the sender and does not represent the advice, views or opinion of
 our company. Accordingly, our company disclaim all responsibility and accept
 no liability (including in negligence) for the consequences of any person
 acting, or refraining from acting, on such information prior to the receipt
 by those persons of subsequent written confirmation. In particular (but not
 by way of limitation) our company disclaims all responsibility and accepts
 no liability for any e-mails which are defamatory, offensive, racist or in
 any other way are in breach of any third party's rights, including breach of
 confidence, privacy or other rights. If you have received this e-mail
 message in error, please notify me immediately by telephone. Please also
 destroy and delete the message from your computer. Any form of reproduction,
 dissemination, copying, disclosure, modification, distribution and/or
 publication of this e-mail message is strictly prohibited.  If you have
 received this E-mail in error, or suspect that the message may have been
 intercepted or amended, please notify ebm-ZIEHL (UK) Ltd on +44(0)1245
 468555.
 ebm-ZIEHL (UK) Ltd Chelmsford Business Park, Chelmsford, Essex CM2 5EZ







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




Re: [PHP-DB] MySql Update.

2002-11-12 Thread Adam Voigt
$query = UPDATE tablename SET ;
foreach($_POST AS $key = $value)
$query .= $key = '$value',;
$query[strlen($query)-1] = ;
$query .=  WHERE id = '$_GET[id]';

Or something?

On Tue, 2002-11-12 at 13:58, David Rice wrote:
 
 
 Making an update query that adapts to the number of fields that are to be 
 updated
 
 Is there anyway to do like a for loop to create the values part of the query 
 then combine it with the first part of the string.
 
 something like what i have below... although something that works correctly 
 as this doesn't.
 ==
 
 $table is the table name
 $num_headers is the number of headers (fieldnames) for that table
 $table_headers is an array with the names of the headers
 $values is an array with the names of the input boxes on the previous page
 
 ==
 $query1 = UPDATE .$table. SET  ;
 
 $query2 = ( for ($x=0; $x =$num_headers; $x++){
. $table_headers[$x] . = . $values[$x] .  , 
}) ;
 
 $query = $query1.$query2 ;
 
 $result = mysql_query ($query) ;
 etc...
 
 
 
 _
 Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
 http://join.msn.com/?page=features/junkmail
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


[PHP-DB] Re: Displaying a single picture...

2002-11-12 Thread Adam Royle
You could do something as simple as this:

a href=displayPic.php?image=/path/to/image.jpgtitle=This is my titleimg 
src=/thumb.jpg border=0/a

I think most browsers will convert the spaces in the link (when clicked) to '+' or 
'%20', but this may not be true with some less popular browsers (i don't know).

Then displayPic.php might be something like this (if you have latest PHP version):

displayPic.php 

?php

$image = isset($_GET['image']) ? $_GET['image'] : /unknown_pic.jpg;
$title = isset($_GET['title]) ? $_GET['title] : /lost_title.jpg;

?
img src=?= $image ?br
?= $title %

--

Hope this helps
Adam

--- Original Message ---
I have several thumbnail images spread out in my website.  I thought it
would be cool to write a single PHP script so that when they click on the
thumbnail, the name of the larger pic would be passed to a PHP script that
displays it on its own page...I don't even care about a link back, they can
just click the browser's back arrow.

How do I get the name stored when they click on the thumbnail?

My confusion is, I'm seeing this one dimensionally.  You click on an image,
it calls a link.  But I need to click on the image, store the name of the
pic I want to display, then call the PHP link.

I've looked at some of the free Image Lib PHP scripts out thereand they
all go wy overboard on what I'm looking to do.

Any suggestions?

Thanks




[PHP-DB] Re: how to put all rows into an array

2002-11-13 Thread Adam Royle
No built-in function, but this can be handy (i have it inside a getData() function, 
which also lets me output data in a number of ways)

HTH, Adam

$sql = SELECT * FROM .;
$DB_RESULT = mysql_query($sql);

$arrData = array();
$rowCount = 0;

while ($r = mysql_fetch_array($DB_RESULT,MYSQL_ASSOC)){
 foreach ($r as $key = $value){
  $arrData[$rowCount++][$key] = $value;
 }
}





Re: [PHP-DB] Multiple Inserts with mySQL

2002-11-14 Thread Adam Voigt
10 Seconds searching in the MySQL Manual:

http://www.mysql.com/doc/en/ANSI_diff_Transactions.html

You have to use InnoDB tables, but this will work.

On Thu, 2002-11-14 at 11:26, Anthony wrote:
 hmm, I guess that would work.  There is no way to have mySQL check for 
 integrity for me is there?  I read in a SQL book a while ago about 
 wrapping multiple inserts in a select statement, that way if any part of 
 the statement failed the whole thing would be rolled back.  From my 
 research though, it doesn't look like mySQL supports this.  Am I right 
 here?  So far it looks like your idea could be the most reliable 
 suggestions I've gotten, so I'll start working on that for now.  Thanks.
 
 - Anthony
 
 Peter Beckman wrote:
  Try this:
  
  $stack is an array of hashes:
  
  $stack[0] = array(0=tablename, 1=insertid());
  
  For each insert you do, push an anonymous array on $stack which includes
  the tablename and insertid of the insert.
  
  Then as you continue your inserts, if any of them fail, call a function
  which takes that array $stack, and iterate through it, deleting the rows
  you just inserted. (see mysql_insert_id() function to get the insert ID)
  
  If none of them do fail, then you are in the clear.  Either unset $stack or
  ignore it.
  
  Peter
  
  On Wed, 13 Nov 2002, Anthony wrote:
  
  
 I have to drop a lot of data into mySQL from PHP.  It will go into quite
 a few different tables.  How can I maintain integrity of the entire
 insert?  I need to do about a dozen inserts on four tables and I need to
 insure that all the inserts are successful or that none of them get
 done.  I'm sort of new at this, so please help me out.  Thanks.
 
 - Anthony
 
 
 --
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
  
  
  ---
  Peter BeckmanSystems Engineer, Fairfax Cable Access Corporation
  [EMAIL PROTECTED] http://www.purplecow.com/
  ---
  
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


[PHP-DB] php sessions using mysql (or any db)

2002-11-15 Thread Adam Nelson
Cannot get code to work for session management on a database.  Does anyone
have tips.  It appears that the data goes into the table, but I can't get it
out.  session_start just initializes the data in the value column.:


SessionsTable definition
---

CREATE TABLE `SessionsTable` (
  `SID` varchar(32) NOT NULL default '',
  `expiration` int(11) NOT NULL default '0',
  `value` text NOT NULL,
  PRIMARY KEY  (`SID`)
) TYPE=MyISAM


mysql_sessions.inc:


?php

// Session Table

$sess_table = SessionsTable;

// Retrieve the session maximum lifetime (found in php.ini)

$lifetime = get_cfg_var(session.gc_maxlifetime);

//=
// function: mysql_session_open()
// purpose: Opens a persistent server connection and selects the
//database.
//=

function mysql_session_open($session_path, $session_name) {

  mysql_pconnect(localhost, root, )
 or die(Can't connect to MySQL server! );

  mysql_select_db(globalDB)
 or die(Can't select MySQL sessions database);

} // end mysql_session_open()

//=
// function: mysql_session_close()
// purpose: Doesn't actually do anything since the server connection is
//persistent. Keep in mind that although this function
//doesn't do anything in my particular implementation, I
//still must define it.
//=

function mysql_session_close() {

  return 1;

} // end mysql_session_close()

//=
// function: mysql_session_select()
// purpose: Reads the session data from the database
//=

function mysql_session_select($SID) {

  GLOBAL $sess_db;
  GLOBAL $sess_table;

  $query = SELECT value FROM $sess_table
  WHERE SID = '$SID' AND
  expiration  . time();

  $result = mysql_query($query);

} // end mysql_session_select()

//=
// function: mysql_session_write()
// purpose: This function writes the session data to the database. If that
SID
// already exists, then the existing data will be updated.
//=

function mysql_session_write($SID,$value) {

  GLOBAL $sess_db;
  GLOBAL $sess_table;
  GLOBAL $lifetime;

  $expiration = time() + $lifetime;

  $query = INSERT INTO $sess_table
  VALUES('$SID', '$expiration', '$value');

  $result = mysql_query($query);

  if (! $result) :

   $query = UPDATE $sess_table SET
   expiration = '$expiration',
   value = '$value' WHERE
   SID = '$SID' AND expiration . time();
   $result = mysql_query($query);

  endif;

} // end mysql_session_write()

//=
// function: mysql_session_destroy()
// purpose: deletes all session information having input SID (only one row)
//=

function mysql_session_destroy($sessionID) {

  GLOBAL $sess_table;

  $query = DELETE FROM $sess_table
  WHERE SID = '$sessionID';
  $result = mysql_query($query);

} // end mysql_session_destroy()

//=
// function: mysql_session_garbage_collect()
// purpose: deletes all sessions that have expired.
//=

function mysql_session_garbage_collect($lifetime) {

  GLOBAL $sess_table;

  $query = DELETE FROM $sess_table
  WHERE sess_expiration  .time() - $lifetime;
  $result = mysql_query($query);

  return mysql_affected_rows($result);

} // end mysql_session_garbage_collect()

?

End of mysql_sessions.inc


---
1-1.php - The first page
---

?
INCLUDE(mysql_sessions.inc);

session_set_save_handler(mysql_session_open, mysql_session_close,
  mysql_session_select, mysql_session_write,
  mysql_session_destroy,
  mysql_session_garbage_collect);

// create a new session
session_start();

// register a session-variable
session_register(bgcolor);

// Assign a value to the session-variable
$_SESSION['bgcolor'] = #8080ff;
?
html
head
titleSession Example #1/title
/head

body bgcolor=?=$_SESSION['bgcolor']? text=#00 link=#00
vlink=#00 alink=#00

Welcome to a session-enabled page! The background color on the next page
will be set to a stylish blue.p
a href = 1-2.phpGo to another session-enabled page/a.
/body
/html

---
End of 1-1.php
---

---
1-2.php - To confirm that the session worked
---
?
INCLUDE(mysql_sessions.inc);

session_set_save_handler(mysql_session_open, mysql_session_close,
  mysql_session_select, mysql_session_write,
  mysql_session_destroy,
  mysql_session_garbage_collect);

// Resume session created in Listing 1-2
session_start();

?

html
head
titleSession Example #1/title
/head

body bgcolor=?=$_SESSION['bgcolor']? text=#00 link=#808040
vlink=#606060 alink=#808000

?

// Display the value of the $bgcolor variable.
printf (The persistent background color is: %s br\n,
$_SESSION['bgcolor']);
?

/body
/html





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

Re: [PHP-DB] Fastest, easiest Flatfile DB with PHP

2002-11-18 Thread Adam Voigt
For massive amounts of data, you really want to use some type
of SQL database. Not only will you save time programming, but
massive server resources aswell since the disk doesn't have to parse
and seek a large flatfile everytime.

On Mon, 2002-11-18 at 09:15, Teemu Pentinsaari wrote:
 hi,
 
 Maybe someone here can point me the way ...
 I'm looking for a fast and easy to use flatfile database working with PHP.
 The amount of stored data, the frequency and number of queries are really
 massive so I'm hoping to be able to skip MySql and build this service with
 some alternative technique. Anyone ?
 
 thanks
 
 Teemu
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


RE: [PHP-DB] php sessions using mysql (or any db)

2002-11-18 Thread Adam Nelson
Thanks for the clarification with the returns.  I made the changes
however and it still doesn't work.  This code comes pretty much straight
off the presses from http://www.onlamp.com/lpt/a/832

What I have is quite modified from what is on there as it is quite buggy
to begin with.  Anyway, It still doesn't work.  In perl, this would have
been done already.  I can't be the first person to try running sessions
on a database.  Does anyone have a session.inc file that would be
appropriate for me.  I feel like it should just be in the php base
files.


 -Original Message-
 From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]] 
 Sent: Friday, November 15, 2002 4:59 PM
 To: Adam Nelson
 Cc: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] php sessions using mysql (or any db)
 
 
  CREATE TABLE `SessionsTable` (
`SID` varchar(32) NOT NULL default '',
 
 This doesn't need to be a varchar.  The sid will always be 32 
 chars, so
 make it a char(32)
 

This is just an artifact of InnoDB/Mysql.  I don't know the specifics,
but I think char is no longer used by InnoDB (ie. it is just an alias
for varchar).  Anyway, I put in char, the ddl pops out as varchar.

`expiration` int(11) NOT NULL default '0',
 
 I would suggest using a timestamp type here so MySQL will handle
 updating it for you automatically.

timestamp would change with every update.  This is a field to describe
when the record should expire

 
  function mysql_session_open($session_path, $session_name) {
 
mysql_pconnect(localhost, root, )
   or die(Can't connect to MySQL server! );
 
mysql_select_db(globalDB)
   or die(Can't select MySQL sessions database);
 
  } // end mysql_session_open()
 
 You need to return true; at the end of this.
 
true.

  function mysql_session_close() {
 
return 1;
 
 No, use return true;
 
  function mysql_session_select($SID) {
 
GLOBAL $sess_db;
GLOBAL $sess_table;
 
$query = SELECT value FROM $sess_table
WHERE SID = '$SID' AND
expiration  . time();
 
$result = mysql_query($query);
 
  } // end mysql_session_select()
 
 Uh, you need to return the actual value here or an empty string on an
 error.
 
  function mysql_session_write($SID,$value) {
 
GLOBAL $sess_db;
GLOBAL $sess_table;
GLOBAL $lifetime;
 
$expiration = time() + $lifetime;
 
$query = INSERT INTO $sess_table
VALUES('$SID', '$expiration', '$value');
 
$result = mysql_query($query);
 
if (! $result) :
 
 $query = UPDATE $sess_table SET
 expiration = '$expiration',
 value = '$value' WHERE
 SID = '$SID' AND expiration . time();
 $result = mysql_query($query);
 
endif;
 
  } // end mysql_session_write()
 
 Again, you *must* return true; on a sucessful write.
 
  function mysql_session_destroy($sessionID) {
 
GLOBAL $sess_table;
 
$query = DELETE FROM $sess_table
WHERE SID = '$sessionID';
$result = mysql_query($query);
 
  } // end mysql_session_destroy()
 
 return true;
 
 -Rasmus
 
 
 
 




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




RE: [PHP-DB] php sessions using mysql (or any db)

2002-11-18 Thread Adam Nelson
This works great :-) Thanks.  

I'll write a letter to onlamp.com to get that misleading code off their
website (maybe it's PHP3 based?).
Perhaps this should be added to PEAR?  It appears that this is the
proper repository for such things.  I'll look into it although I would
be much obliged if somebody in the know could handle this since I am new
to PHP.

One thing I left out - I had to take out the $GLOBALS[acdb] part from
mysql_query.  This doesn't work with my version of php (4.2.3) I guess.
Also, assert(!empty($SessionTableName)); didn't work, so I commented it
out.


 -Original Message-
 From: Peter Beckman [mailto:[EMAIL PROTECTED]] 
 Sent: Monday, November 18, 2002 12:01 PM
 To: Adam Nelson
 Cc: [EMAIL PROTECTED]; 'Rasmus Lerdorf'
 Subject: RE: [PHP-DB] php sessions using mysql (or any db)
 
 
 ?php  // I got this somewhere.  It works.
// This code is released under the same license as 
 PHP. (http://www.php.net/license.html)
assert(get_cfg_var(session.save_handler) == user);
// Without save_handler being set to user, everything 
 works fine until it calls the write handler.
$SessionTableName = get_cfg_var(session.save_path); 
 // [$database.]tablename
'
function db_error_message() {
  return mysql_error();
}
function mysql_session_open ($save_path, $session_name) {
return true;
}
function mysql_session_close() {
return true;
}
function mysql_session_read ($SessionID) {
global $SessionTableName;
$SessionID = addslashes($SessionID);
$session_data = mysql_query(SELECT Data FROM 
 $SessionTableName WHERE SessionID = '$SessionID',$GLOBALS[acdb]) or
 die(db_error_mess
 age());
if (mysql_numrows($session_data) == 1) {
return mysql_result($session_data, 0);
} else {
return false;
}
}
function mysql_session_write ($SessionID, $val) {
global $SessionTableName;
$SessionID = addslashes($SessionID);
$val = addslashes($val);
$SessionExists = mysql_result(mysql_query(SELECT 
 COUNT(*) FROM $SessionTableName WHERE SessionID = 
 '$SessionID',$GLOBALS[acdb]),
 0
 );
if ($SessionExists == 0) {
$retval = mysql_query(INSERT INTO 
 $SessionTableName (SessionID, LastActive, Data) VALUES ('$SessionID',

 UNIX_TIMESTAMP(NOW()),'$val'),$GLOBALS[acdb]) or 
 die(db_error_message());
} else {
$retval = mysql_query(UPDATE 
 $SessionTableName SET Data = '$val', LastActive = 
 UNIX_TIMESTAMP(NOW()) WHERE SessionID =
'$SessionID',$GLOBALS[acdb]) or 
 die(db_error_message());
if (mysql_affected_rows()  0) {
error_log(unable to update session data 
 for session $SessionID);
}
}
return $retval;
}
function mysql_session_destroy ($SessionID) {
global $SessionTableName;
$SessionID = addslashes($SessionID);
$retval = mysql_query(DELETE FROM 
 $SessionTableName WHERE SessionID = 
 '$SessionID',$GLOBALS[acdb]) or die(db_error_message());
return $retval;
}
function mysql_session_gc ($maxlifetime = 604800) {
global $SessionTableName;
$CutoffTime = time() - $maxlifetime;
$retval = mysql_query(DELETE FROM 
 $SessionTableName WHERE LastActive  
 $CutoffTime,$GLOBALS[acdb]) or die(db_error_message());
return $retval;
}
session_set_save_handler (
'mysql_session_open',
'mysql_session_close',
'mysql_session_read',
'mysql_session_write',
'mysql_session_destroy',
'mysql_session_gc'
);
 ?
 On Mon, 18 Nov 2002, Adam Nelson wrote:
 
  Thanks for the clarification with the returns.  I made the changes
  however and it still doesn't work.  This code comes pretty 
 much straight
  off the presses from http://www.onlamp.com/lpt/a/832
 
  What I have is quite modified from what is on there as it 
 is quite buggy
  to begin with.  Anyway, It still doesn't work.  In perl, 
 this would have
  been done already.  I can't be the first person to try 
 running sessions
  on a database.  Does anyone have a session.inc file that would be
  appropriate for me.  I feel like it should just be in the php base
  files.
 
 
   -Original Message-
   From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]]
   Sent: Friday, November 15, 2002 4:59 PM
   To: Adam Nelson
   Cc: [EMAIL PROTECTED]
   Subject: Re: [PHP-DB] php sessions using mysql (or any db)
  
  
CREATE TABLE `SessionsTable` (
  `SID` varchar(32) NOT NULL default '',
  
   This doesn't need to be a varchar.  The sid will always be 32
   chars, so
   make it a char(32)
  
 
  This is just

RE: [PHP-DB] php sessions using mysql (or any db)

2002-11-18 Thread Adam Royle
Hi,

Just wondering, which is the better method:

1. Using PHP sessions ($_SESSION['var'] = val;)
2. Using mySQL-based sessions (as described in this thread)

I know if you're using multiple servers, a DB-based session would be handy.

Any comments, anyone?

Adam



[PHP-DB] Get Last ID Inserted

2002-11-21 Thread Adam Voigt
Using Microsoft SQL does anyone know how to get the id of the row that
you just inserted without clumsily trying to select the id back based on
the same criteria of your insert (which might be overlapping)?

-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] inserting html into mysql tables

2002-11-21 Thread Adam Voigt
Well for one, VARCHAR is limited to 255 characters, so I would use
a TEXT type datafield if you want to store more then 255.

On Thu, 2002-11-21 at 11:01, mike karthauser wrote:
 hi, 
 is there anything special i need to know in regards to creating a table to
 hold html data? I am building a CMS for a site using php and mysql. The
 various tables hold course information that the client wants to edit. I
 imagine it will be a case of dropping the cleaned html source from
 dreamweaver into a form box and posting it to the table.
 
 What would a good varchar(?) be for say 5K of data?
 
 cheers
 mikek  
 -- 
 Mike Karthauser 
 Managing Director - Brightstorm Ltd
 
 Email[EMAIL PROTECTED]
 Web  http://www.brightstorm.co.uk
 Tel  0117 9426653 (office)
07939 252144 (mobile)
 
 SnailmailUnit 8, 14 King Square,
Bristol BS2 8JJ
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] Re: Get Last ID Inserted

2002-11-21 Thread Adam Voigt
But if there are heavy operations on the site, will this not also pick
up a different last inserted id, if in the split milisecond between the
insert and the next mssql_query which has the @@identity say, another
user does an insert?

On Thu, 2002-11-21 at 11:03, David Elliott wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hello Adam
 
 On 21 November 2002 at 10:47:15 -0500 (which was 15:47 where I live) Adam
 Voigt wrote
 
  Using Microsoft SQL does anyone know how to get the id of the row that
  you just inserted without clumsily trying to select the id back based on
  the same criteria of your insert (which might be overlapping)?
 
 select @@identity
 
 - --
  Cheers,   ___
   David   |David  Elliott|   Software Engineer|
  _| [EMAIL PROTECTED] | PGP Key ID 0x650F4534  |
 | No dinner with Mel Gibson?! - Dot Warner|
 
 -BEGIN PGP SIGNATURE-
 Version: 6.5.8ckt http://www.ipgpp.com/
 
 iQA/AwUBPd0DwfmK8eZlD0U0EQI3fACgsv52o5AvhuroJIVYblYXTnkiDZYAn2Ao
 y1AeA+bR4KPOwZhZTAa2x7kr
 =f/lr
 -END PGP SIGNATURE-
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] Re: Get Last ID Inserted

2002-11-21 Thread Adam Voigt
Ahh, thanks very much.

On Thu, 2002-11-21 at 12:08, David Elliott wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hello Adam
 
 On 21 November 2002 at 11:12:46 -0500 (which was 16:12 where I live) Adam
 Voigt rearranged electrons to get
 
  But if there are heavy operations on the site, will this not also pick
  up a different last inserted id, if in the split milisecond between the
  insert and the next mssql_query which has the @@identity say, another
  user does an insert?
 
 No. It picks up the last identity on that connection. So it does not mater
 how many other connections and what they are doing.
 
 It can only be wrong if you close off the connection and open another one.
 The other way is to put it all into one SQL statement (as long as you don't
 use mssql_? functions in PHP)
 
 e.g. (one I used earlier)
 
 ==8=
 begin transaction
 
 set nocount on
 
 declare
   @NewId int
 
 update item
 set name = 'Canada Delivery'
 where itemid = '428'
 
 insert into item
 (ItemTypeId, Name, LastUpdated)
 values
 (49,'Mexico Delivery',getutcdate())
 
 set @NewId = @@identity
 
 insert into DelArea
 (itemid,StdEUR, StdGBP, StdUSD, HotEUR, HotGBP, HotUSD)
 values
 (@NewId,37,19,45,134,70,70)
 
 Update country
 set DelId = @NewId
 where itemid = 288
 
 commit
 
 select
   @NewId NewDelId
 
 ==8=
 
 
 
 - --
  Ti2GO,___
   David   |David  Elliott|   Software Engineer|
  _| [EMAIL PROTECTED] | PGP Key ID 0x650F4534  |
 | Do you think someone was BORGED when they made these up?|
 
 -BEGIN PGP SIGNATURE-
 Version: 6.5.8ckt http://www.ipgpp.com/
 
 iQA/AwUBPd0TBPmK8eZlD0U0EQL1awCgmS57QwyvS+bz02XsLQtwJOSGSB8AoLmo
 I9VdgNIsp3GXkzWAX6I1jYpp
 =UXBQ
 -END PGP SIGNATURE-
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


RE: [PHP-DB] Check data exists in MySQL

2002-11-21 Thread Adam Royle
Sorry about previous post (some stupid shortcut key made it send)

Your row:

$sql = INSERT INTO count VALUES('$dept', '$deptsub', '0');

should be:

$sql = INSERT INTO count VALUES('$dept', '$deptsub', '0');

You missed the double quotes.

Adam




--- Original Message ---

Hi,

for some reason i'm getting an error when I try to run this query:
__

  $sql=SELECT num FROM count where dept='$dept' AND deptsub='$deptsub';
  $page_count = mysql_query($sql,$db);

  # If does not exist in the database, insert a new entry
  if (!mysql_num_rows($page_count)){
$sql = INSERT INTO count VALUES('$dept', '$deptsub', '0');
$result = mysql_query($sql,$db);
  }

  #Update the count in the database
  $page_count = $page_count + 1;
  $sql=UPDATE count SET num='$page_count' WHERE dept='$dept' AND
deptsub='$deptsub';
  $result = mysql_query($sql, $db);
__

My table looks like this:
  count:
 dept VARCHAR(32)
 deptsub VARCHAR(32)
 num INT(10)
__

I'm getting the following error message:
  Parse error: parse error in /home/./public_html/public/index.php on
line 25
(Which is the line: $sql=UPDATE count...)


Any thoughts would b most helpful.
Thanks,
Gav




[PHP-DB] MySQL/PHP Iterative Tree

2002-11-26 Thread Adam Voigt
Ok, I've been racking my brain trying to figure this one out, so
I thought I'd post the question here and see who bytes. =)

I have a table:

id INTEGER, PRIMARY KEY
parentid INTEGER DEFAULT (0)
name VARCHAR(32) NOT NULL

Ok, and I am using this structure to make a kind of drill down
structure, so the top level would be where parentid = '0', then
you take those id's and select from this table where parentid is
equal to those id's, and now your starting to navigate through
the tree, and so on.

Now, the real question, I have found a Javascript menu script which
will let users of the site click on it, and then click on the submenu
and down and down through all the level's that might dynamically exist,
but I can't for the life of me figure out how to recursively get the
name and id for each row (which is what I need to build the menu and
make link's out of each item), for as many sublevel's as there might be
(infinite). Am I missing something, is there a simple logical way to do
this recursively? Or if there's a semi-complex way, anyone got a script
example? I'd very much appreciate it.

-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] Re: MySQL/PHP Iterative Tree

2002-11-26 Thread Adam Voigt
A coworker suggested I just write either the array or the actual menu
itself (in a .js file) at the time of category/subcategory creation and
just include it on the page with the menu, which I suppose is what I
must do since most other on-the-fly solutions seem fairly complicated
and can get exponentially resource intensive. Thanks for your help.

On Tue, 2002-11-26 at 11:07, David Elliott wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 Hello 1LT
 
 On 26 November 2002 at 09:54:57 -0500 (which was 14:54 where I live) 1LT
 John W. Holmes emanated these words of wisdom
 
  You may want to check out using Nested Sets instead of a Parent-Child-ID
  system.
 
 This is OK for some simple trees, however it does have some limitations.
 
 (1) Adding another tree / series of nodes into the middle if the set.
 
 (2) A child node that belongs to more than one parent.
 
 - --
  Cheers,   ___
   David   |David  Elliott|   Software Engineer|
  _| [EMAIL PROTECTED] | PGP Key ID 0x650F4534  |
 | Mathematicians DO IT with sum.  |
 
 -BEGIN PGP SIGNATURE-
 Version: 6.5.8ckt http://www.ipgpp.com/
 
 iQA/AwUBPeOcYPmK8eZlD0U0EQJRVACfXZGjwwUlKOV1yEvtEf96D0MdNakAnAuF
 PBlwh2HSenDKSVvldLp8H3fb
 =QE8q
 -END PGP SIGNATURE-
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] Resource id #2

2002-11-26 Thread Adam Voigt
Add: print_r($row)

In your while loop, that will show you everything that is being returned
with both it's numeric and text based position.

On Tue, 2002-11-26 at 13:09, The Cossins Fam wrote:
 Hello.
 
 I am using MySQL as a database for a departmental library.  I have written
 a quick search script, but keep getting resource id #2 as a result to my
 search.  I have read the online documentation for the
 mysql_fetch_array() function and must say, I don't see that I'm missing
 anything.  However, I've only started programming, much less working with
 PHP, so perhaps someone can help me out.  Here's my code:
 
 ?
 
 $quickSearch = mcse;
 
 $table1 = Books;
 $table2 = BookList;
 $table3 = BoxSet;
 $table4 = Category;
 $table5 = Publisher;
 $table6 = AuthUsers;
 $table7 = CD;
 
 $connection = mysql_connect(localhost, root) or die(Couldn't connect
 to the library database.);
 
 $db_select = mysql_select_db(library, $connection) or die(Couldn't
 select the library database.);
 
 $search = SELECT * FROM $table1 LEFT JOIN $table2 ON Books.BookListID =
 BookList.BookListID
 LEFT JOIN $table3 ON Books.BoxSetID = BoxSet.BoxSetID
 LEFT JOIN $table4 ON Books.CategoryID = Category.CategoryID
 LEFT JOIN $table5 ON Books.PublisherID = Publisher.PublisherID
 LEFT JOIN $table6 ON Books.auID = AuthUsers.auID
 LEFT JOIN $table7 ON Books.CD = CD.CD_ID
 WHERE Books.Title LIKE \%'$quickSearch'%\
 OR Books.Author LIKE \%'$quickSearch'%\
 OR Books.ISBN LIKE \%'$quickSearch'%\
 OR BookList.dbase LIKE \%'$quickSearch'%\
 OR BookList.dbase_user LIKE \%'$quickSearch'%\
 OR BoxSet.BoxSet LIKE \%'$quickSearch'%\
 OR Category.Category LIKE \%'$quickSearch'%\
 OR Category.Sub_category LIKE \%'$quickSearch'%\
 OR Publisher.Publisher LIKE \%'$quickSearch'%\;
 
 $result = mysql_query($search, $connection) or die(Couldn't search the
 library.);
 
 while ($row = mysql_fetch_array($result)) {
 $row['Books.Title'];
 $row['Books.Author'];
 $row['Books.ISBN'];
 $row['BookList.dbase'];
 $row['BookList.dbase_user'];
 $row['BoxSet.BoxSet'];
 $row['Category.Category'];
 $row['Category.Sub_category'];
 $row['Publisher.Publisher'];
 $row['AuthUsers.email'];
 
 }
 
 
 ?
 
 I then have some HTML to display the result of the search.  I don't
 receive any error messages - I just see an empty table from the HTML
 code I wrote.  I added an echo of the $result to find the resouce id
 #2.
 
 Thanks for any help you can provide.
 
 --joel
 
 
 
 
 
 
 
 _
 The new MSN 8: advanced junk mail protection and 2 months FREE* 
 http://join.msn.com/?page=features/junkmail
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] Connecting to MS SQL 7

2002-11-27 Thread Adam Voigt
A. I think the php3_ isn't a good sign. 
B. You should remove whatever you found on the web and downloaded.
C. Copy all the DLL's in the dll folder (under your PHP folder) to
C:\WINNT\SYSTEM32
D. Re-copy the php.ini-recommended from your PHP folder to
C:\WINNT\php.ini and see if it stops looking for php3.

On Tue, 2002-11-26 at 18:36, Mark Farmer wrote:
 I have successfully installed PHP 4.2.3 on a Win NT 4 server, running IIS 4, 
 and can execute PHP functions now.
 
 However, when I try to connect to an MS SQL 7 database on the same box, I 
 receive this error: PHP Warning: Unable to load dynamic library 
 './php3_mssql70.dll' - %1 is not a valid Windows NT application, and my 
 mssql_connect statment fails.
 
 What I had done was to find a copy of php3_mssql70.dll on the web and copy 
 it onto the server -- various faqs told me this needed to happen in order 
 for database calls to work.
 
 Why isn't this dll being recognized as a valid Windows NT application, then?
 
 Thank you.
 
 _
 STOP MORE SPAM with the new MSN 8 and get 2 months FREE* 
 http://join.msn.com/?page=features/junkmail
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] Resource id #2

2002-11-27 Thread Adam Voigt
Umm, he is putting them into an array, I quote:

while ($row = mysql_fetch_array($result)) {
  $row['Books.Title'];
  $row['Books.Author'];
  $row['Books.ISBN'];
  $row['BookList.dbase'];
  $row['BookList.dbase_user'];
  $row['BoxSet.BoxSet'];
  $row['Category.Category'];
  $row['Category.Sub_category'];
  $row['Publisher.Publisher'];
  $row['AuthUsers.email'];
  
  }

See the while condition?

On Wed, 2002-11-27 at 06:03, Chris Barnes wrote:
 You need to put your $result into an array. you can use:
 
 $result_array = mysql_fetch_array($result);
 
 then, if you know the field names in the array, print them like so:
 
 echo $result_array[field1];
 echo $result_array[field2];
 
 or if you dont know their names you can refer to their position numbers
 starting from 0 e.g.
 
 echo $result_array[0];
 echo $result_array[1];
 
 using the position numbers you could put together a quick script to
 crawl through the array and print all the fields with a few lines of
 code.
 
 On Wed, 2002-11-27 at 05:09, The Cossins Fam wrote:
  Hello.
  
  I am using MySQL as a database for a departmental library.  I have written
  a quick search script, but keep getting resource id #2 as a result to my
  search.  I have read the online documentation for the
  mysql_fetch_array() function and must say, I don't see that I'm missing
  anything.  However, I've only started programming, much less working with
  PHP, so perhaps someone can help me out.  Here's my code:
  
  ?
  
  $quickSearch = mcse;
  
  $table1 = Books;
  $table2 = BookList;
  $table3 = BoxSet;
  $table4 = Category;
  $table5 = Publisher;
  $table6 = AuthUsers;
  $table7 = CD;
  
  $connection = mysql_connect(localhost, root) or die(Couldn't connect
  to the library database.);
  
  $db_select = mysql_select_db(library, $connection) or die(Couldn't
  select the library database.);
  
  $search = SELECT * FROM $table1 LEFT JOIN $table2 ON Books.BookListID =
  BookList.BookListID
  LEFT JOIN $table3 ON Books.BoxSetID = BoxSet.BoxSetID
  LEFT JOIN $table4 ON Books.CategoryID = Category.CategoryID
  LEFT JOIN $table5 ON Books.PublisherID = Publisher.PublisherID
  LEFT JOIN $table6 ON Books.auID = AuthUsers.auID
  LEFT JOIN $table7 ON Books.CD = CD.CD_ID
  WHERE Books.Title LIKE \%'$quickSearch'%\
  OR Books.Author LIKE \%'$quickSearch'%\
  OR Books.ISBN LIKE \%'$quickSearch'%\
  OR BookList.dbase LIKE \%'$quickSearch'%\
  OR BookList.dbase_user LIKE \%'$quickSearch'%\
  OR BoxSet.BoxSet LIKE \%'$quickSearch'%\
  OR Category.Category LIKE \%'$quickSearch'%\
  OR Category.Sub_category LIKE \%'$quickSearch'%\
  OR Publisher.Publisher LIKE \%'$quickSearch'%\;
  
  $result = mysql_query($search, $connection) or die(Couldn't search the
  library.);
  
  while ($row = mysql_fetch_array($result)) {
  $row['Books.Title'];
  $row['Books.Author'];
  $row['Books.ISBN'];
  $row['BookList.dbase'];
  $row['BookList.dbase_user'];
  $row['BoxSet.BoxSet'];
  $row['Category.Category'];
  $row['Category.Sub_category'];
  $row['Publisher.Publisher'];
  $row['AuthUsers.email'];
  
  }
  
  
  ?
  
  I then have some HTML to display the result of the search.  I don't
  receive any error messages - I just see an empty table from the HTML
  code I wrote.  I added an echo of the $result to find the resouce id
  #2.
  
  Thanks for any help you can provide.
  
  --joel
  
  
  
  
  
  
  
  _
  The new MSN 8: advanced junk mail protection and 2 months FREE* 
  http://join.msn.com/?page=features/junkmail
  
  
  -- 
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
  
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] PHP4, Apache 1.3.x, and mod ssl install document?

2002-11-27 Thread Adam Voigt
Off the top of my head (general guidelines, don't use word for word):

mkdir /usr/local/apache
cd /usr/local/apache
wget http://www.apache.org/dist/httpd/apache_1.3.27.tar.gz
tar -zxf *
cd apache_1.3.27
./configure --prefix=/usr/local/apache_1.3.27
mkdir /usr/local/modssl
cd /usr/local/modssl
wget http://www.modssl.org/source/mod_ssl-2.8.12-1.3.27.tar.gz
tar -zxf *
cd mod_ssl-2.8.12-1.3.27
./configure --with-apache=/usr/local/apache/apache_1.3.27
cd /usr/local/apache/apache_1.3.27

./configure --prefix=/usr/local/apache_1.3.27 --enable-module=ssl
--enable-module=so

make
make certificate type=test (OPTIONAL)
make install
mkdir /usr/local/php
cd /usr/local/php

lynx
http://www.php.net/do_download.php?mr=http%3A%2F%2Fwww.php.net%2Fdf=php-4.2.3.tar.gz
(Save the file with lynx)

tar -zxf *
cd php_4.2.3

./configure --with-apxs=/usr/local/apache_1.3.27/bin/apxs
--with-mysql=/usr

make
make install

Add the line:

application/x-httpd-php .php

To somewhere near the bottom of your httpd.conf
and while your in httpd.conf configure the values you like.

On Wed, 2002-11-27 at 10:38, RClark wrote:
 Hello all,
 
 I have a FreeBSD server which has been updated to 4.7 STABLE. I have updated
 my ports collection and installed mysql server. Does anyone have an updated
 doc on how to install apache with PHP4 and modssl support either from ports
 collection or from source. I would greatly appreciate it.
 
 Thanks
 Ron
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] Resource id #2

2002-11-27 Thread Adam Voigt
They don't do anything, but my point was, he said that what he pulled
from the DB needed to be put into an array, and I was pointing out, it
already was.

On Wed, 2002-11-27 at 12:23, Mark wrote:
 But what do all those $row['fieldname'} rows do? Call me ignorant
 (you wouldn't be the first), but a statement that simply has a
 variable name doesn't DO anything. Should these have echos in front
 of them?
 
 --- Adam Voigt [EMAIL PROTECTED] wrote:
  Umm, he is putting them into an array, I quote:
  
  while ($row = mysql_fetch_array($result)) {
$row['Books.Title'];
$row['Books.Author'];
$row['Books.ISBN'];
$row['BookList.dbase'];
$row['BookList.dbase_user'];
$row['BoxSet.BoxSet'];
$row['Category.Category'];
$row['Category.Sub_category'];
$row['Publisher.Publisher'];
$row['AuthUsers.email'];

}
  
  See the while condition?
  
  On Wed, 2002-11-27 at 06:03, Chris Barnes wrote:
   You need to put your $result into an array. you can use:
   
   $result_array = mysql_fetch_array($result);
   
   then, if you know the field names in the array, print them like
  so:
   
   echo $result_array[field1];
   echo $result_array[field2];
   
   or if you dont know their names you can refer to their position
  numbers
   starting from 0 e.g.
   
   echo $result_array[0];
   echo $result_array[1];
   
   using the position numbers you could put together a quick script
  to
   crawl through the array and print all the fields with a few lines
  of
   code.
   
   On Wed, 2002-11-27 at 05:09, The Cossins Fam wrote:
Hello.

I am using MySQL as a database for a departmental library.  I
  have written
a quick search script, but keep getting resource id #2 as a
  result to my
search.  I have read the online documentation for the
mysql_fetch_array() function and must say, I don't see that I'm
  missing
anything.  However, I've only started programming, much less
  working with
PHP, so perhaps someone can help me out.  Here's my code:

?

$quickSearch = mcse;

$table1 = Books;
$table2 = BookList;
$table3 = BoxSet;
$table4 = Category;
$table5 = Publisher;
$table6 = AuthUsers;
$table7 = CD;

$connection = mysql_connect(localhost, root) or
  die(Couldn't connect
to the library database.);

$db_select = mysql_select_db(library, $connection) or
  die(Couldn't
select the library database.);

$search = SELECT * FROM $table1 LEFT JOIN $table2 ON
  Books.BookListID =
BookList.BookListID
LEFT JOIN $table3 ON Books.BoxSetID = BoxSet.BoxSetID
LEFT JOIN $table4 ON Books.CategoryID =
  Category.CategoryID
LEFT JOIN $table5 ON Books.PublisherID =
  Publisher.PublisherID
LEFT JOIN $table6 ON Books.auID = AuthUsers.auID
LEFT JOIN $table7 ON Books.CD = CD.CD_ID
WHERE Books.Title LIKE \%'$quickSearch'%\
OR Books.Author LIKE \%'$quickSearch'%\
OR Books.ISBN LIKE \%'$quickSearch'%\
OR BookList.dbase LIKE \%'$quickSearch'%\
OR BookList.dbase_user LIKE \%'$quickSearch'%\
OR BoxSet.BoxSet LIKE \%'$quickSearch'%\
OR Category.Category LIKE \%'$quickSearch'%\
OR Category.Sub_category LIKE \%'$quickSearch'%\
OR Publisher.Publisher LIKE \%'$quickSearch'%\;

$result = mysql_query($search, $connection) or die(Couldn't
  search the
library.);

while ($row = mysql_fetch_array($result)) {
$row['Books.Title'];
$row['Books.Author'];
$row['Books.ISBN'];
$row['BookList.dbase'];
$row['BookList.dbase_user'];
$row['BoxSet.BoxSet'];
$row['Category.Category'];
$row['Category.Sub_category'];
$row['Publisher.Publisher'];
$row['AuthUsers.email'];

}


?

I then have some HTML to display the result of the search.  I
  don't
receive any error messages - I just see an empty table from the
  HTML
code I wrote.  I added an echo of the $result to find the
  resouce id
#2.

Thanks for any help you can provide.

--joel







   
  _
The new MSN 8: advanced junk mail protection and 2 months FREE*
  
http://join.msn.com/?page=features/junkmail


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

   
  -- 
  Adam Voigt ([EMAIL PROTECTED])
  The Cryptocomm Group
  My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
  
 
  ATTACHMENT part 2 application/pgp-signature name=signature.asc
 
 
 
 =
 Mark Weinstock
 [EMAIL PROTECTED]
 ***
 You can't demand something

Re: [PHP-DB] Refining my search app..

2002-12-02 Thread Adam Voigt




A little cleaner:



switch($_POST[column])

{

case(foo):$query = mysql_query(WHATVER);break;

case(too):$query = mysql_query(BLAH);break;

default:$query = mysql_query(DOH);break;

}



while($row = mysql_fetch_array($query))

{

// DO SOMETHING

}





-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] Return 1 instance of each unique record?

2002-12-06 Thread Adam Williams
use GROUP BY field

Adam

On Fri, 6 Dec 2002, Doug Coning wrote:

 Hi everyone:

 How do I get MySQL to summarize a query so that I receive only 1 instance
 per similar record.  I.E. if you have 10 records with name Smith and 5
 records with Barney, etc, that it would return 2 records instead of 15.

 Thanks!

 Doug Coning







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




[PHP-DB] Re: Check Automaticaly

2002-12-08 Thread Adam Royle
I would imagine your game would have two frames (one hidden frame), and the hidden 
frame would contain scripts to check and update page.

In the bottom frame i see you might have two choices:

1. have a meta refresh which checks every 5 (or so) secs if a move has been made, and 
if detects a move, sends a refresh command to the top frame

2. have a php script which continually checks if a move has been made ( using sleep() 
function and set_time_limit() ), and if detects a move, sends a javascript command to 
browser, then continue detecting if changes have been made..

the implications of #2 (i would image), is the explorer icon will be constantly 
loading a page, so if you click stop, the game will cease

hope that helps
adam



Re: [PHP-DB] passing variables

2002-12-09 Thread Adam Williams
www.php.net/isset

if !isset($var)
{
echo var is not set to anything;
}
else
{
echo var is set to $var;
}


On Mon, 9 Dec 2002, Edward Peloke wrote:

 Hello all,

 I have a login/register screen for my php/mysql db.  When the page opens,
 the user sees the log in screen but I have a button and reloads the same
 page, hopefully with the register screen.  I know I can simply check to see
 if a variable is set with

 if ($variable){} .  This does not seem to work when I give an image a name
 and link it to the same page.  The image is named register and it links back
 to the same page, so the page loads, I click on the register image , the
 page reloads but the variable is not set.


 Any ideas?

 Thanks,
 Eddie





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




Re: [PHP-DB] More Apache Installation problems

2002-12-09 Thread Adam Williams
can your main workstation ping 192.168.1.1

On Mon, 9 Dec 2002, Alex Francis wrote:

 At last I have Apache and PHP running on my server.
 My server IP is 192.168.1.1 and I have set ServerName 192.168.1.1 in my
 httpd.conf file.

 I can access my test files from the server using either http://localhost or
 http://192.168.1.1, however if I try the same on my main workstation I can't
 find the server. Is there something else I need to do.






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




Re: [PHP-DB] More Apache Installation problems

2002-12-09 Thread Adam Williams
can you ping your router?  is it filtering ICMP?  can you ping anything?
is your cat 5 cable crimped properly and you have link lights on your
switch/hub/router and network card?

Adam

On Mon, 9 Dec 2002, Alex Francis wrote:

 It seems like a network problem. I can access the network through windows
 network neighborhood but can't ping it, any suggestions?

 Gene Dymarskiy [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 make sure both your server and workstation  can see each other.

 try  pinging the server:

 ping 192.168.1.1



 -Original Message-
 From: Alex Francis [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 1:39 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] More Apache Installation problems


 At last I have Apache and PHP running on my server.
 My server IP is 192.168.1.1 and I have set ServerName 192.168.1.1 in my
 httpd.conf file.

 I can access my test files from the server using either http://localhost or
 http://192.168.1.1, however if I try the same on my main workstation I can't
 find the server. Is there something else I need to do.



 --
 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




RE: [PHP-DB] More Apache Installation problems

2002-12-09 Thread Adam Williams
No I think he has his WS with a real IP from his ISP and then his web
server plugged into the same hub as his WS but with 192.168.1.1.  He'll
either need to get a 2nd NIC and give it an ip like 192.168.1.2 or get a
cable modem router.  Or change his WS to linux and add eth0:0 with
192.168.1.2 :)

Adam

On Mon, 9 Dec 2002, Gene Dymarskiy wrote:





 I am a bit confused.

 Your WS is connected to cable modem and gets public IP assigned by your ISP. Your WS 
is also connected to a hub shared with your web server.

 does it mean you have two network cards, one connected to cable modem, and the other 
to the hub?





 -Original Message-
 From: Alex Francis [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 2:20 PM
 To: Gene Dymarskiy
 Subject: RE: [PHP-DB] More Apache Installation problems


 I need to have a server assigned IP address on my workstation for my cable
 modem.

 -Original Message-
 From: Gene Dymarskiy [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 8:06 PM
 To: Alex Francis; [EMAIL PROTECTED]
 Subject: RE: [PHP-DB] More Apache Installation problems


 I'd check IP address of your workstation. make sure both the WS and the
 server are on the same subnet. Your WS should have 192.168 address, too.

 good luck

 -Original Message-
 From: Alex Francis [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 2:00 PM
 To: [EMAIL PROTECTED]
 Subject: Re: [PHP-DB] More Apache Installation problems


 It seems like a network problem. I can access the network through windows
 network neighborhood but can't ping it, any suggestions?

 Gene Dymarskiy [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 make sure both your server and workstation  can see each other.

 try  pinging the server:

 ping 192.168.1.1



 -Original Message-
 From: Alex Francis [mailto:[EMAIL PROTECTED]]
 Sent: Monday, December 09, 2002 1:39 PM
 To: [EMAIL PROTECTED]
 Subject: [PHP-DB] More Apache Installation problems


 At last I have Apache and PHP running on my server.
 My server IP is 192.168.1.1 and I have set ServerName 192.168.1.1 in my
 httpd.conf file.

 I can access my test files from the server using either http://localhost or
 http://192.168.1.1, however if I try the same on my main workstation I can't
 find the server. Is there something else I need to do.



 --
 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 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




Re: [PHP-DB] More Apache Installation problems

2002-12-09 Thread Adam Williams
what you need to do is have 1 nic going directly to your cable modem using
a cross over cable, and then with the 2nd NIC in your WS plug it into the
hub along with the web server box, or ditch the hub and connect the WS to
the web server with a cross over cable.

Adam

On Mon, 9 Dec 2002, Alex Francis wrote:

 Adam, You are correct.

 I had two NICs, set up exactly as you describe, but kept getting problems (I
 would lose my internet connection and have to reboot to get it back. I think
 I will try againand if that fails, buy a cable modem router.

 Adam Williams [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
  No I think he has his WS with a real IP from his ISP and then his web
  server plugged into the same hub as his WS but with 192.168.1.1.  He'll
  either need to get a 2nd NIC and give it an ip like 192.168.1.2 or get a
  cable modem router.  Or change his WS to linux and add eth0:0 with
  192.168.1.2 :)
 
  Adam
 
  On Mon, 9 Dec 2002, Gene Dymarskiy wrote:
 
  
  
  
  
   I am a bit confused.
  
   Your WS is connected to cable modem and gets public IP assigned by your
 ISP. Your WS is also connected to a hub shared with your web server.
  
   does it mean you have two network cards, one connected to cable modem,
 and the other to the hub?
  
  
  
  
  
   -Original Message-
   From: Alex Francis [mailto:[EMAIL PROTECTED]]
   Sent: Monday, December 09, 2002 2:20 PM
   To: Gene Dymarskiy
   Subject: RE: [PHP-DB] More Apache Installation problems
  
  
   I need to have a server assigned IP address on my workstation for my
 cable
   modem.
  
   -Original Message-
   From: Gene Dymarskiy [mailto:[EMAIL PROTECTED]]
   Sent: Monday, December 09, 2002 8:06 PM
   To: Alex Francis; [EMAIL PROTECTED]
   Subject: RE: [PHP-DB] More Apache Installation problems
  
  
   I'd check IP address of your workstation. make sure both the WS and the
   server are on the same subnet. Your WS should have 192.168 address,
 too.
  
   good luck
  
   -Original Message-
   From: Alex Francis [mailto:[EMAIL PROTECTED]]
   Sent: Monday, December 09, 2002 2:00 PM
   To: [EMAIL PROTECTED]
   Subject: Re: [PHP-DB] More Apache Installation problems
  
  
   It seems like a network problem. I can access the network through
 windows
   network neighborhood but can't ping it, any suggestions?
  
   Gene Dymarskiy [EMAIL PROTECTED] wrote in message
   [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
   make sure both your server and workstation  can see each other.
  
   try  pinging the server:
  
   ping 192.168.1.1
  
  
  
   -Original Message-
   From: Alex Francis [mailto:[EMAIL PROTECTED]]
   Sent: Monday, December 09, 2002 1:39 PM
   To: [EMAIL PROTECTED]
   Subject: [PHP-DB] More Apache Installation problems
  
  
   At last I have Apache and PHP running on my server.
   My server IP is 192.168.1.1 and I have set ServerName 192.168.1.1 in my
   httpd.conf file.
  
   I can access my test files from the server using either http://localhost
 or
   http://192.168.1.1, however if I try the same on my main workstation I
 can't
   find the server. Is there something else I need to do.
  
  
  
   --
   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 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] Re: Delay Confirmation....

2002-12-09 Thread Adam Royle
Use:

set_time_limit(0); // let script run forever

Have a look at output control functions, particularly:

ob_start();
ob_flush();

They might help you

Adam

--- Original Message ---

Hi, I'm still new in PHP...,

I have some problem in using sleep() function.

Actually, I want to make a script that confirm the user to wait for 10
seconds before proceed to the next step. First the message Please wait
for 10 seconds while we're processing your request... will be shown to
user, then at the same time I want to delay the processing for 10
seconds with sleep() function.

This is my script :

?php
$i=0;
set_time_limit(10);
print(Please wait for 10 seconds while we're processing your
request...); sleep(10);
$query=insert into..; 
etc.
?

But the result juz not like I wanted. The sleep runs before the message
shown up..., not before the query...  I think, sleep() is delayed a
whole scriptboth, the message and the query result are printed out
after 10 seconds... It makes me so confused

How could I fix it ??? Please help me...


--www.kapsul.org--
  DuFronte




[PHP-DB] MSSQL Text Length Restriction

2002-12-10 Thread Adam Voigt




I can't seem to get more then 255 characters to be sent back from a field

in our MSSQL database, unless the fields is a TEXT type, which is very

inefficient. Anyone know a fix? (I've already tried modifying the max size

variables in the php.ini under the MSSQL section.)





-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


RE: [PHP-DB] MSSQL Text Length Restriction

2002-12-10 Thread Adam Voigt




Didn't work, thanks anyway.



On Tue, 2002-12-10 at 10:43, [EMAIL PROTECTED] wrote:

 this little snippet works for me.



mssql_query(set textsize 65536);



HTH

Jeff







Adam Voigt  

adam@cryptoco   To: Hutchins, Richard [EMAIL PROTECTED]   

mm.com  cc: [EMAIL PROTECTED]   

 Subject: RE: [PHP-DB] MSSQL Text Length Restriction

12/10/2002  

10:35 AM













Ok, my question was in reguards to Microsoft SQL (MSSQL), you are

referering to MySQL.





On Tue, 2002-12-10 at 10:21, Hutchins, Richard wrote: Look at the tinyblob

(tinytext), mediumblob (mediumtext), blob (text), longblob

(longtext)column types in the MySQL manual. Storage-wise they don't look

too terribly inefficient. -Original Message-

From: Adam Voigt [mailto:[EMAIL PROTECTED]]

Sent: Tuesday, December 10, 2002 10:18 AM

To: [EMAIL PROTECTED]

Subject: [PHP-DB] MSSQL Text Length Restriction





I can't seem to get more then 255 characters to be sent back from a field

in our MSSQL database, unless the fields is a TEXT type, which is very

inefficient. Anyone know a fix? (I've already tried modifying the max size

variables in the php.ini under the MSSQL section.)













   --   

   Adam Voigt ([EMAIL PROTECTED]) 

   The Cryptocomm Group 

   My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 









   --   

   Adam Voigt ([EMAIL PROTECTED]) 

   The Cryptocomm Group 

   My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 


















-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


RE: [PHP-DB] MSSQL Text Length Restriction

2002-12-10 Thread Adam Voigt




Uncommented, and set to the max value (2147483647). No effect.



On Tue, 2002-12-10 at 10:57, [EMAIL PROTECTED] wrote:

Adam.

 are these lines uncommented in your php.ini?  They are under [MSSQL]



; Valid range 0 - 2147483647.  Default = 4096.

;mssql.textlimit = 4096



; Valid range 0 - 2147483647.  Default = 4096.

;mssql.textsize = 4096



sorry, i'm not replying to the other email.  i deleted it accidentally











Jeffrey N Dyke  

 To: Adam Voigt [EMAIL PROTECTED]   

12/10/2002   cc: [EMAIL PROTECTED], Hutchins, Richard  

10:43 AM [EMAIL PROTECTED]   

 Subject: RE: [PHP-DB] MSSQL Text Length Restriction(Document link: 

 Jeff Dyke) 









 this little snippet works for me.



mssql_query(set textsize 65536);



HTH

Jeff







Adam Voigt  

adam@cryptoco   To: Hutchins, Richard [EMAIL PROTECTED]   

mm.com  cc: [EMAIL PROTECTED]   

 Subject: RE: [PHP-DB] MSSQL Text Length Restriction

12/10/2002  

10:35 AM













Ok, my question was in reguards to Microsoft SQL (MSSQL), you are

referering to MySQL.





On Tue, 2002-12-10 at 10:21, Hutchins, Richard wrote: Look at the tinyblob

(tinytext), mediumblob (mediumtext), blob (text), longblob

(longtext)column types in the MySQL manual. Storage-wise they don't look

too terribly inefficient. -Original Message-

From: Adam Voigt [mailto:[EMAIL PROTECTED]]

Sent: Tuesday, December 10, 2002 10:18 AM

To: [EMAIL PROTECTED]

Subject: [PHP-DB] MSSQL Text Length Restriction





I can't seem to get more then 255 characters to be sent back from a field

in our MSSQL database, unless the fields is a TEXT type, which is very

inefficient. Anyone know a fix? (I've already tried modifying the max size

variables in the php.ini under the MSSQL section.)













   --   

   Adam Voigt ([EMAIL PROTECTED]) 

   The Cryptocomm Group 

   My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc 









   --   

   Adam Voigt ([EMAIL PROTECTED

Re: [PHP-DB] bulk miorting rows into mysql db

2002-12-13 Thread Adam Williams
use mysqlimport, its a program that comes with MySQL.  go to www.mysql.com
and click on documentation to learn more about it.

Adam

On Fri, 13 Dec 2002, mikek wrote:

 I have a few hundred rows of data to import into a mysql db. Its currently
 tab separated.

 What's the most straight forward way (ie i dont want to enter it line by
 line) of doing a bulk import?

 I have full admin rights to my dev server. Is there a method or software app
 that people can recommend to me.

 Much appreciated.

 ---
 Mike Karthauser - email:[EMAIL PROTECTED] - phone:0117 9426653
 brightstorm - curiously online - http://www.brightstorm.co.uk





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




Re: [PHP-DB] Get error message, need help

2002-12-16 Thread Adam Voigt




Your missing a semicolon (;) after your first $myquery = line.



- Original Message -

From: David [EMAIL PROTECTED]

To: [EMAIL PROTECTED]

Sent: Monday, December 16, 2002 2:16 AM

Subject: [PHP-DB] Get error message, need help





 Hello all,



 I am new to PHP so I am going to need some help.



 I am trying to create a admin login page. But I am getting this error

 message:



 Parse error: parse error, unexpected T_VARIABLE in c:\program files\apache

 group\apache\htdocs\sunwestsilver\admin\tmpi5pcf76sy9.php on line 43



 tmpi5pcf76sy9.php is generated by Dreamweaver MX as a temp file from

 admin.php



 It is coming  from this line:



 this is line 43 code



 # $myquery = .' AND password = ' . crypt($password, xpz8ty) . ';



 The complete code is:



 // Query Database with username and encrypted password

   #$myquery = SELECT * FROM user WHERE username = ' . $user

   #$myquery = .' AND password = ' . crypt($password, xpz8ty) . ';

   #$result = mysql_query($myquery);

   #if (!$result)

   #{

   #  $error = Cannot run Query;

  #return($error);

   #}



 Any help will be nice.



 I got this code from Dreamweaver MX: PHP Web Development pg. 257



 Thanks



 David







 --

 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






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] keyword search a mysql database.

2002-12-18 Thread Adam Voigt




$searchstring = $_POST[searchfor];

$searchstring = str_replace( ,%,$searchstring);



mssql_query(SELECT id FROM table WHERE field LIKE '$searchstring';);



This will give you a looser search where all search terms have

to be there, but not necessarily next to each other, if you want a phrase search

so they have to follow each other:



$searchstring = % . $_POST[searchfor] . %;



mssql_query(SELECT id FROM table WHERE field LIKE '$searchstring';);



Make sense?



On Wed, 2002-12-18 at 12:44, mike karthauser wrote:

I'm looking for tips and tricks in how to approach building a keyword search

over an number of fields in a courses database.



I know how i can search for one word at a time, but i am not sure on how i

would approach searching via a defined string.



Anyone got any good pointers for doing this/ or some tutorial that i can

read though?



Thanks..



BTW kettles on if anyone wants a brew..

-- 

Mike Karthauser 

Managing Director - Brightstorm Ltd



Email[EMAIL PROTECTED]

Web  http://www.brightstorm.co.uk

Tel  0117 9426653 (office)

   07939 252144 (mobile)



SnailmailUnit 8, 14 King Square,

   Bristol BS2 8JJ





-- 

PHP Database Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP-DB] Re: Finding zipcode within radius of another zipcode.

2002-12-25 Thread Adam Royle
There are databases / packages you can buy which already have this 
information in them. A simple search for 'purchase postcode database' 
on Google gave me a few leads.

Adam

Hi folks,

I'm building a PHP/MySQL database for a customer. It's an advanced 
mailing
list for a band. They want to be able to send e-mails targetted to 
people
around where a gig takes place. For instance, if a concert is taking 
place
somewhere in the 42071 zipcode, they want to e-mail everyone within 500
miles of 42071. The database will have around 10,000 members, with 
e-mail
and mailing addresses.

Does anyone have a good idea for this?

Thanks a ton,

John Thile (gilrain)
http://lunarpolicy.net


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




Re: [PHP-DB] Help with FTP

2002-12-27 Thread Adam Williams
use system() to run /bin/df

depending on the OS you might need to add a flag to it like -h (linux) or
-k (solaris).

www.php.net/system

Adam

On Fri, 27 Dec 2002, Dankshit wrote:

 Is there a way to see how much space is left in a ftp server?

 thanks in advance!



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




[PHP-DB] Re: File Upload ---Thanks!

2003-01-07 Thread Adam Royle
Yep. Been using Mac OS X (10.1 - 10.2.3) with mySQL no problems. I 
built it from source first time, but now I just use Mac OS X packages 
from Mark Liyanage. You can find them here. Also he has a good 
pre-compiled PHP4 you can download and use.

http://www.entropy.ch/software/MacOSx/mysql/

Adam


Thanks folks - persistence pays off and so does group discussions . I 
had chmodded the uploads directory to 777 but it was within the 
public_html directory with different file permissions so I guess 
public_html permissions were taking presidence. After reading all of 
your suggestions... a little light turned on and I moved the uploads 
directory outside of the public-html directory and Volia!

Uploading file...
File uploaded successfully

Preview of uploaded file contents:
THIS IS A TEST.


Thanks Again.
Anyone using a Macintosh with MySql? That is my next goal.


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




[PHP-DB] Re: mysql_errno() list?

2003-01-10 Thread Adam Royle
Just use a combination of mysql_errno() and mysql_error():

 echo mysql_errno() . :  . mysql_error(). \n;

Adam

PS. Documentation always rocks!


Hi guys,
I've been playing with PHP for a while now, and love the mysql 
functions,
but there's one thing I'd like to know...

I want to check if a mysql error is a certain number, and thats all 
fair
enough because every time i encounter an error I can write down what 
that
error was. However, it would be handy if I could have my own define 
file
with all the errors in. Can I ask if anyone has a list of errors and 
their
numbers for mysql_errno? I've looked on the web and found a load of 
errors
for the mysql daemon (the page told me to look in
/usr/share/mysql/mysql_errors.txt) but this isnt the file I want as the
errors there relate to the server and not errors with a query I'm 
running

Thanks in advance for any help

James Booker
EMPICS Sports Photo Agency
http://www.empics.com


Re: [PHP-DB] data move

2003-01-13 Thread Adam Voigt




Umm, if it's a one time deal, why not just have access output a CSV (comma seperated version, or something like that)

and use PHP or phpMyAdmin if it will do it, to do your insert's? That way you don't have to have PHP interface with

Access, just the MySQL part which is real easy.



On Mon, 2003-01-13 at 09:12, Edward Peloke wrote:

Ok, I know I have asked this question several times but it is time for me to

start coding so I am looking for some goog tutorials somewhere.  I need to

use php to transfer data from an access file to mysql db.  I assume I will

just use an odbc connection but I am unsure as to where to start.  If anyone

knows of any good tutorials or samples, please point me in the right

direction.



Thanks,

Eddie





-- 

PHP Database Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] javascript and submitting forms

2003-01-14 Thread Adam Royle
Hi Mignon,

This should work, never closing the window without submitting  
(foolproof). Just add some error checking, and you'll be sweet as a  
nut! All I did was add the echo statement underneath the data insert.

Adam


?
include ('dbconn.php');
if(isset($submit))
	 {
	$query = INSERT INTO `comments` (  `track_id`, `cat_comments` )  
VALUES ( '0', '$comm' );;
	mysql_query ($query, $link );
	
	echo 'htmlheadscript  
language=JavaScriptwindow.close();/script/headbody/body/ 
html';
		
	}
?
!DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN
html
head
title/title
/head
body
form action=comp_page3.php method=POST
Enter your details here:br
textarea name=comm rows=15 cols=30/textareabr

input type=submit name=submit value=Close and Save

/form
/body
/html


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



RE: [PHP-DB] Send mail with a file

2003-01-16 Thread Adam Voigt




Unix has nothing to do with it, the mail command in PHP on unix is the same mail command

in PHP on windows. If you want to use attachments you need to use a class like phpMimeEmail

or whatever it's called go to phpclasses.org, it's on there somewhere.



On Thu, 2003-01-16 at 09:33, NIPP, SCOTT V (SBCSI) wrote:

	Under Unix I don't know that this is possible, but hopefully someone

else will know of a way.  I would love to be able to e-mail some Excel files

that I generate with a Perl cron job, but there does not appear to be any

practical way to do this in Unix.



-Original Message-

From: Bruno Pereira [mailto:[EMAIL PROTECTED]]

Sent: Thursday, January 16, 2003 3:47 AM

To: [EMAIL PROTECTED]; [EMAIL PROTECTED]

Subject: [PHP-DB] Send mail with a file





How can i insert a file on a mail, with the command mail()? It is

possible?



Cumprimentos



Bruno Pereira

[EMAIL PROTECTED]



-Original Message-

From: Bruno Pereira [mailto:[EMAIL PROTECTED]]

Sent: quarta-feira, 15 de Janeiro de 2003 14:48

Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]

Subject: Concatenate two strings





How can i join two strings.

My code is something like:

$valor1=bruno;

$valor2=Pereira;

$valor=$valor1 +   + $valor2



Can someone help me. Thanks.



Cumprimentos



Bruno Pereira

[EMAIL PROTECTED]





-- 

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






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP-DB] Re: Email to a list of address in your database.

2003-01-19 Thread Adam Royle
This should work. You were on the right track, although you might want to
use better var names so you don't get confused. You can see I have changed
them to what I would normally use.

Adam

?php
$sql = select * from users;
$result = mysql_query($sql, $connection) or die(Couldn't execute
query.);

while($row = mysql_fetch_array($result)) {
 $to[] = $row['emailAddress'];
}

$mailTo = implode(;,$to);
?
pa href=mailto:?= $mailTo ?mail To all my list/a/p


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




[PHP-DB] Re: Using strlen and substr to Shorten DB Results

2003-01-26 Thread Adam Royle
Try this. PHP arrays are cool! Of course there are tidier ways to  
implement this, but this is just an example.

Adam

-- Code --

$getscname = mysql_query(SELECT * FROM subcat WHERE subcatid =  
'$subcatid') or die (Couldn't get the info.br.mysql_error());

while($sub_cat = mysql_fetch_array($getscname)){
	$subcat_id = $sub_cat['subcatid'];
	$subcat_name = $sub_cat['subcatname'];

	$arrCats[] = 'a  
href=subcat.php?catid='.$catid.'sc='.$subcat_id.''.$subcat_name.'/ 
a';
}
	
echo  
implode('nbsp;nbsp;nbsp;nbsp;|nbsp;nbsp;nbsp;nbsp;',$arrCats);

-- Code --


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



[PHP-DB] Re: Images-weird!!

2003-02-02 Thread Adam Royle
Hi Mihai,

Didn't try your code, but noticed your comment on colours. RBG values go from 0 - 255, 
not 1 - 256, so this may be your problem.

Adam



Re: [PHP-DB] Date format in MySQL

2003-02-03 Thread Adam Voigt




$query = mysql_query(SELECT UNIX_TIMESTAMP(fieldname) AS date WHERE id = '1';);

$array = mysql_fetch_array($query);



$mydate = date(j F, Y,$array[date]);



Change fieldname and the where clause, and that should work.

If you want to further munipulate how it looks, just look at the

date manual page:



http://www.php.net/date



And change the first parameter to the date function.





On Mon, 2003-02-03 at 09:09, RUBANOWICZ Lisa wrote:

Hi All, I have a date format of -MM-DD in MySQL and am showing it on a PHP page.  However I want to show it as 

2 February, 2003

or 2 February

Can someone please help me.  The date will not necessarily be todays date (I looked at the datetime() function and the getdate() function but couldn't work it out for these)

Thanks for your support

All the best

Lisa



Lisa Rubanowicz

CNH Ireland

Tel: +353 46 77663

Email:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]



 








-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] Storing iterated results into various variables

2003-02-04 Thread Adam Voigt




$counter = 1;

$query = mysql_query(SELECT image,caption FROM tablename ORDER BY id;);



while($row = mysql_fetch_array($query))

{



$imagevar = image . $counter;

$captionvar = caption . $counter;



$$imagevar = $row[image];

$$captionvar = $row[caption];



$counter++;



}



Change the query to match what you need, and that should work, if

your interested, check out the manual page on Variable Variables at: 



http://www.php.net/manual/en/language.variables.variable.php



Enjoy.



On Tue, 2003-02-04 at 07:02, Geckodeep wrote:

May be some one could help me here, I am trying to retrieve results from a

table that gives 9 rows, from each row I am trying to pull out two fields

and assign the two values of those column fields to a variable $image1 and

$caption1, and now I want to go to the next row and pick up the values of

the corresponding fields and store it in the next variable $image2 and

$caption2 and to continue until I reach 9 rows.



The reason for this technique is I am trying to inject the dynamic data

inside a page which is already formatted with HTMLs (kind of template) and

by means of Php tags I can echo these variables where needed.







Thanks for your time and help in advance I'd appreciate it.







GD







-- 

PHP Database Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


RE: [PHP-DB] A little JOIN help please...

2003-02-04 Thread Adam Royle
SELECT B.Title FROM phpCalendar_Details AS B, phpCalendar_Daily AS A
WHERE A.CalendarDetailsID = B.CalendarDetailsID AND CURDATE(  )  BETWEEN
A.StartDate AND A.StopDate





Also, you don't need to use the backticks around field names unless they contain 
spaces or other reserved words and characters.

Adam



RE: [PHP-DB] collaborating on a document

2003-02-11 Thread Adam Voigt




Riiight, anyway, since Adobe Acrobat is the worst possible answer for

updating in real time (and completely wouldn't work), I would say, yes,

two frames should work, but you might even want a third (hidden) at the

bottom that never stops executing, just pulling entry's out when new ones

are added, and use _javascript_ to add them to the right frames with the ideas.



On Tue, 2003-02-11 at 10:16, Hutchins, Richard wrote:

1. This question has nothing to do with PHP or databases.

2. Adobe already thought of it: Adobe Acrobat 5.0.



 -Original Message-

 From: Baumgartner Jeffrey [mailto:[EMAIL PROTECTED]]

 Sent: Tuesday, February 11, 2003 10:13 AM

 To: [EMAIL PROTECTED]

 Subject: [PHP-DB] collaborating on a document

 

 

 I'm thinking about making a little tool where people can 

 contribute ideas in

 real time. Thus far, the best way I can see to do this is via 2 frames

 

 Frame 1: for entering data - which is inserted into a table. 

 

 Frame 2: would select from the table.  It would also refresh 

 frequently -

 say every 30 seconds.

 

 But perhaps you have a more elegant solution?

 

 Thanks,

 

 Jeffrey Baumgartner

 

 eBusiness Consultant - ITP Europe

 http://www.itp-europe.com

 [EMAIL PROTECTED]

 +32 2 721 51 00

 

 

 -- 

 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






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


RE: [PHP-DB] collaborating on a document

2003-02-11 Thread Adam Voigt




Ofcourse then everyone has to have Adobe installed, which is probably less likely

then having _javascript_ enabled.



On Tue, 2003-02-11 at 10:39, Hutchins, Richard wrote:

Actually, Adobe 5.0 implemented on a server in Assembled or Integrated

(their words, not mine) configuration DOES allow for real-time document

collaboration. Whether this solution would actually solve the problem is

determined by the requirements of the collaboration environment.



If you're thinking Acrobat 4.0, you're absolutely right. Real-time

collaboration is, for all practical purposes, non-existent.



I'm not going to get into any further debate because it's off topic and all

of the information is available on Adobe.com, specifically in the following

links:

http://www.adobe.com/products/acrobat/pdfs/acr05_review_wp.pdf

and, more generally, http://www.adobe.com/acrofamily/collaboration.html.



In regards to actually implementing a solution using JS, yes can work, but

you're walking what can be a tight rope on client-side configuration. Some

of the standard issues are:

1. You have to make sure your users all have JS enabled or your app won't

work.

2. You'll have to write cross-browser compatible code back to v. 4.0

browsers as a standard.

3. Refreshing a screen every 30 seconds is going to really tick off users

that don't have DSL or better connections.



These issues are certainly not insurmountable. All of the above concerns can

be alleviated, if not eliminated, if you're going to implement on an

intranet where you have control over what clients are used. But in the WWW

arena, you just don't know what clients are going to be used.

-Original Message-

From: Adam Voigt [mailto:[EMAIL PROTECTED]]

Sent: Tuesday, February 11, 2003 10:25 AM

To: [EMAIL PROTECTED]

Cc: [EMAIL PROTECTED]

Subject: RE: [PHP-DB] collaborating on a document





Riiight, anyway, since Adobe Acrobat is the worst possible answer

for 

updating in real time (and completely wouldn't work), I would say, yes, 

two frames should work, but you might even want a third (hidden) at the 

bottom that never stops executing, just pulling entry's out when new ones 

are added, and use _javascript_ to add them to the right frames with the

ideas. 



On Tue, 2003-02-11 at 10:16, Hutchins, Richard wrote: 

1. This question has nothing to do with PHP or databases. 

2. Adobe already thought of it: Adobe Acrobat 5.0. 



 -Original Message- 

 From: Baumgartner Jeffrey [mailto:[EMAIL PROTECTED]] 

 Sent: Tuesday, February 11, 2003 10:13 AM 

 To: [EMAIL PROTECTED] 

 Subject: [PHP-DB] collaborating on a document 

 

 

 I'm thinking about making a little tool where people can 

 contribute ideas in 

 real time. Thus far, the best way I can see to do this is via 2 frames 

 

 Frame 1: for entering data - which is inserted into a table. 

 

 Frame 2: would select from the table. It would also refresh 

 frequently - 

 say every 30 seconds. 

 

 But perhaps you have a more elegant solution? 

 

 Thanks, 

 

 Jeffrey Baumgartner 

 

 eBusiness Consultant - ITP Europe 

 http://www.itp-europe.com 

 [EMAIL PROTECTED] 

 +32 2 721 51 00 

 

 

 -- 

 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 



-- 

Adam Voigt ([EMAIL PROTECTED])

The Cryptocomm Group

My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



-- 

PHP Database Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB]

2003-02-12 Thread Adam Voigt




Very first result on google:



http://www.oreillynet.com/cs/user/view/cs_msg/7231



Look at the first reply.

(Next time go to google first.)



On Wed, 2003-02-12 at 08:40, nikos wrote:

Hi List!



I'm trying to Drop a Table and aI get an error as follows:

Error on delete of './horceng/oikology.MYI' (Errcode: 13)



Does anybody know what is the error 13?

Thanks





Qbit

  - Gatsis Nikos

Web developer

tel.: 2108256721 - 2108256722

fax: 2108256712

email: [EMAIL PROTECTED]

http://www.qbit.gr 




-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP-DB] Re: Web Page Caching

2003-02-16 Thread Adam Royle
This may not be true in your case, but I remember another user on this list claiming a 
similar thing, and his problem was actually code-related. He had his db update code 
*AFTER* the results were displayed (ie. doing edit and save on same page).

Check your programming logic. Just a note to people out there who may not have much 
programming experience - try doing all of your server-side processing (or at least db 
and filesystem calls, etc) before you output any data, this way you can implement 
error checking etc and still use the header() function, etc. 

Adam


--- Original Message ---

Hello,

I don't know if this is the right list to send this question to.  It appears that the 
browser caches the result after a PHP page updates the database.  I have to manually 
reload it in order to see the updates.  Does anyone know how to overcome this?

Thanks,

Philip



[PHP-DB] Re: Recordsets and associative arrays

2003-02-17 Thread Adam Royle
Hi Don,

Use this process:

?php

 // create an empty array to fill with data
 $data = array();

$row = 0;
  while ($r = mysql_fetch_assoc($result)){
   foreach ($r as $key = $value){
$data[$row][$key] = $value;
   }
   $row++;
  }

?

The array structure would be something like this:

$data[0]['Name'] = 'Name 1';
$data[0]['Address'] = 'Address1';
$data[0]['City'] = 'City1';
$data[1]['Name'] = 'Name 2';
$data[1]['Address'] = 'Address2';
$data[1]['City'] = 'City2';
$data[2]['Name'] = 'Name 3';
$data[2]['Address'] = 'Address3';
$data[2]['City'] = 'City3';

etc etc

HTH Adam

- Original Message -
Message-ID: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
From: Don Briggs [EMAIL PROTECTED]
Date: Mon, 17 Feb 2003 16:42:51 -0600
Subject: Recordsets and associative arrays

Hello.

I am having a problem with syntax. Here is what I am doing. I have the
follwing table

|Name|Address  |City|
=
|Name 1 | Address1   | City1 |
|Name 2 | Address2   | City2 |
|Name 3 | Address3   | City3 |
|Name 4 | Address4   | City4 |
=

I can fetch a single record into an associative array. But I need to put
these records into an multi-dimentional associatave array. I have tried to
figure out what the syntax should be, but it has not worked. The only thing
is that the key names will be different from the field names, and we won't
be putting all of the record fields into the table. So we can't just make an
array of the associative arrays returned by mysql_fetcharray($result). Hope
you can help me out.

Don!


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




Re: [PHP-DB] LIMIT problem MSSQL

2003-02-19 Thread Adam Voigt




Assuming your sorting by id, just do:



SELECT TOP 50 * FROM TABLE WHERE id  $lastid



And just have lastid posting to the page every time

they hit next, and in lastid, put the last id of the results

on that page.



On Wed, 2003-02-19 at 09:59, Noam Giladi wrote:

I'm trying to split results into different pages and number the pages

accordingly.  I've been able to build a fairly intelligent page numbering

system which knows which rows it should pull (at least by numbering each row

numerically) but I don't know how to construct a SQL query to pull 10

results starting at a certain number.



please  did anyone wrote a proc that do it?.









-- 

PHP Database Mailing List (http://www.php.net/)

To unsubscribe, visit: http://www.php.net/unsub.php






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


Re: [PHP-DB] LIMIT problem MSSQL

2003-02-19 Thread Adam Voigt




Well if you do, (sort by id) this will work.



On Wed, 2003-02-19 at 11:14, Noam Giladi wrote:

i'm not using a fixed sort



tnx  noam

  Adam Voigt [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]

  Assuming your sorting by id, just do: 



  SELECT TOP 50 * FROM TABLE WHERE id  $lastid 



  And just have lastid posting to the page every time 

  they hit next, and in lastid, put the last id of the results 

  on that page. 



  On Wed, 2003-02-19 at 09:59, Noam Giladi wrote: 

I'm trying to split results into different pages and number the pages 

accordingly. I've been able to build a fairly intelligent page numbering 

system which knows which rows it should pull (at least by numbering each row 

numerically) but I don't know how to construct a SQL query to pull 10 

results starting at a certain number. 



please did anyone wrote a proc that do it?. 









-- 

PHP Database Mailing List (http://www.php.net/) 

To unsubscribe, visit: http://www.php.net/unsub.php 



-- 

Adam Voigt ([EMAIL PROTECTED])

The Cryptocomm Group

My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc

   






-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP-DB] Re: Using results from one mysql query to make another

2003-02-27 Thread Adam Royle
SELECT b.name FROM apliexperts a LEFT JOIN experts b ON a.expid = b.id 
WHERE softid = 2

I have a table that includes the ids of software
aplications and experts (apliexperts). My page is
loaded with the variable of the software id (softid),
which it uses to match the experts for that software.
But instead of returning just the expert id (expid),
to use that expid to get the full row entry from the
experts table.
So if my apliexperts table has the rows:
[softid] [expid] [id]
   3   0   0
   2   1   1
   2   2   3
And the experts table has:
[id] [Name]
  0paul
  1john
  2mark
It needs to return john and mark if the softid is 2.

thanks,

Jay

Re: [PHP-DB] Processing Page

2003-02-27 Thread Adam Royle
I have seen an example using JavaScript where javascript commands are flushed every so 
often (from PHP) which indicates a status bar process. It was used to monitor 
mailouts. The javascript commands were simply telling an image to increase it's width. 
Of course you have to have a system where you can gauge percentages of things done. 
Alternatively, you could simply use same method (without image), and after db stuff is 
done, output a javascript redirect.

The above is probably confusing, but ask me if you need more explanation.

Adam

-Original Message-
From: Aspire Something [mailto:[EMAIL PROTECTED] 
Sent: Thursday, February 27, 2003 2:56 PM
To: php-db
Subject: Re: [PHP-DB] Processing Page

Thanks every one ...

All the method you told me are static it does not look if the sql
statemet
being exec by php along with backend has finished its job . I only
wanted to
show the processig page till the time the query does it's work .

let me add here that the time for execution of the script here is
unpridictable and it is expected that it may vary according to the job
given
thus
I cannot hardcode the refresh time .

Regads,
V Kashyap


Re: [PHP-DB] Help with MySQL Logic

2003-03-03 Thread Adam Voigt




Heh. Sounds like a programming class homework project.

I would say through the clever use of where clauses's, like:



UPDATE position SET posistion = (position-1) WHERE position  $idremoved;



Would work, assuming $idremoved containted the position of the car removed.



On Mon, 2003-03-03 at 10:59, Rankin, Randy wrote:

Hello All,



This may be a bit off topic. If so, my apololgies. 



A client of mine, a rail car storage company, has asked that I create a

PHP/MySQL application in which they will maintain and track rail cars. I am

having a bit of trouble however working through one of thier requirements.

They need to know in what position the rail car is on each track. For

example, they might have a track called X which will hold 30 rail cars. They

would enter the car information for 30 cars and associate each of them with

track X. If one of the car owners decides to move car 3 out of storage, then

the remaining 29 cars must be re-numbered ( ie; car 1 and 2 would remain and

car 4-30 would become car 3-29 ). In the same manner, I need to be able to

add a car to the track once an empty slot is available. For example, If the

new car goes at the front of the track then it would become car 1 and the

remaining cars, originally numbered 1-29 would become 2-30. 



I hope I explained thourougly. Any suggestions would be appreciated. 



Randy




-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc








signature.asc
Description: This is a digitally signed message part


[PHP-DB] Re: Dynamic Variable names

2003-03-09 Thread Adam Royle
It's probably better to use arrays.

$tips[0] = value;
$tips[1] = value;
$tips[2] = value;
Although, if you REALLY want dynamic variable names.

$i = 1;
$varname = 'tips_'.$i;
$$varname = value;
this will make a variable like below:

$tips_1 = value;

But like I said before, it's better to use arrays - they are much more 
flexible (and PHP arrays are especially cool).

http://www.php.net/manual/en/ref.array.php

adam

Just a quick question about dynamic variables

would like to end up with a variable called
$tips_1
$tips_2
...
$tips_n
where n is the value of the variable $sid

i have tried

$tips . '$sid';

and other variants, but i can't get one that doesn't return a parse 
error or T_VARIABLE error.


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


[PHP-DB] Re: adding to an array variable using a loop...?

2003-03-10 Thread Adam Royle
I assume the field 'date' in your database is a date field, and in your code
you are trying to do a date + 1, but you are not specifying *what* you are
adding to the date (ie. 1 day, 1 week, 1 month), therefore the whole
variable is being replaced (with a 1). Try looking at the various date
functions (or string functions) to work out how to do this. Depending on how
your date is setup you would use strtotime() or mktime() (or both).

Adam

--- Original Message ---
I want to create an array from results returned from a mysql query. I want
it to go through each row in the returned result, and if the variable in the
array staff exists add 1 to the total, if it doesnt exist, set it as one and
carry on.

But when i run this and do var_dump, it just returns 1 in the array for
every date.

I don't think my logic for this is correct, please help.
Cheers,
Dave.
==
$query = SELECT * FROM Rota WHERE date = $start and date = ($start +
INTERVAL 6 DAY) ;
 $result = mysql_query($query);
 while ($row = mysql_fetch_array($result)){
  $x = 1;
  $date = $row['Date'];
  if ( isset($staff[$date] ) ){
   $staff[$date] = $staff[$date] + $x ;
  }
  else{
   $staff[$date] = $x ;
  }

 }


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



[PHP-DB] Re: PHP script execution - display issue

2003-03-13 Thread Adam Royle
This is neither a PHP nor database question. This is client side. 
Anyway, a simple fact is that tables won't render until the whole table 
has been loaded into memory (ie. it won't show until it reaches the 
/table tag). If you have your whole site inside one big table, then 
this is what is causing your problems. Unfortunately, sometimes this 
unavoidable. To make it run sequentially, you could do this, or use 
divs with absolute positioning. just a thought.

Adam

Hello,
I have a display problem with one of my sites.
Because there is an big amount of information in the pages, which is
extracted from database, using IE browser I see only the background of
the site, and then, after a time, the whole page.
My client has recently requested to make something to improve the site
speed and display time.
So because all the site is done using the classes, and the information
is extracted through them, I reduced the instruction numbers, and I
compacted as much as I could the classes. But I still have the display
problem using IE browser : I see the background, and just after that I
see the whole site.
I mention that the classes are included, and the class function is
called through $this_class-function($parameters); Not all the classes
used in the page are called In the beginning; and another mention is
that the site pages contains 4 sections. Top, left, middle,  right.
My question is:
Is there a way to display sequentially the site. After the background,
to display the first section (top), then left part, middle part and
right part after that ?
Again, the site loads like this : the background, then the whole page.
This doesn't matter if I use dial-up or T1.
My client saw, for example, that cnn or yahoo site loads sequentially.
Knowing that yahoo is done in php, I'm wondering how they did it.
Thanks
Petre Nicoara


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


RE: [PHP-DB] Addslashes (MSSQL)

2003-03-20 Thread Adam Voigt
Umm, how about using str_replace to replace the quotes for there ASCII
equivalent's,
and when you print them out in HTML they will be interpreted properly,
or you
could str_replace them back.

On Thu, 2003-03-20 at 11:23, Poon, Kelvin (Infomart) wrote:

Actually, that eliminated the error messages but it still hasn't fix
the
problem

I did what you saidbut now in my MSSQL table, the content column
has
somethign like thsi

Step 1: blah blah balh
Step 2: blah balh balh \'Username\'

so it included the slashes...I just learned that mSSQL doens;t
accept
slashes so is there any other way I can fix this problem?..I want
literally

step 1: balh bah balh
Step 2: balhb alhb alhb 'Username'

to be inserted to the table..please help 

thanks a lot by the way

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 11:06 AM
To: Poon, Kelvin (Infomart); [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Addslashes (MSSQL)


 where my $content value is osmethign like this.

 Step 1: Access the homepage
 Step 2: type in your username under the field 'username' 

 and after the addslashes funciton there would be \ around the
'username'
 like this..
 \'username\'and now after running this program I got an error
message:

 Warning: MS SQL message: Line 14: Incorrect syntax near
'username'.
 (severity 15) in
d:\apache_docroots\internal.infomart.ca\infodesk\kb_add.php
 on line 119

I think you need to replace ' with '' in MSSQL (one single quote
replaced
with two single quotes)

$text = str_replace(','',$old_text);

---John Holmes...


-- 
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


-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc


[PHP-DB] Including Details in MySQL longer than 255 characters

2003-03-20 Thread Adam Venturella
Ok So I have my Database/Tables all set up.  What I wanna know how to do /
find a tutorial on is how I might go about  including details longer than
255 characters that are referenced by a mysql query.  So basically I have
some thing like this on the inputs:

First:
Last:
Email:
Comments:

Now the comments Section, I basically want to type in whatever I want.
Since that could be larger than 255 characters how do I get mysql to
reference that chunck of text in a query.  I imagine the text will have to
be stored outside the DB and read in to the HTML at an appropriate time or
done like a message board or something. I would also like to keep it
searchable. So that I could do a search through the whole DB and keep
comments included in that search  well maybe do a drop down that
references the various fields to search and if you select comments you would
get a select like select * from data where comments =$input

Anyway if someone could point me in the right direction I would be very
appreciative.

Adam
[EMAIL PROTECTED]



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



Re: [PHP-DB] Including Details in MySQL longer than 255 characters

2003-03-20 Thread Adam Venturella
Thanks,

I totally forgot about that type...
And thanks to everyone else who replied!

-a


Mike Karthauser [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 on 20/3/03 6:11 pm, Adam Venturella at [EMAIL PROTECTED] wrote:

  Anyway if someone could point me in the right direction I would be very
  appreciative.

 Change your column type to TEXT rather than varchar(255)

 --
 Mike Karthauser
 Managing Director - Brightstorm Ltd

 Email[EMAIL PROTECTED]
 Web  http://www.brightstorm.co.uk
 Tel  0117 9426653 (office)
07939 252144 (mobile)

 SnailmailUnit 8, 14 King Square,
Bristol BS2 8JJ




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



[PHP-DB] RE: MySql Help needed

2003-03-31 Thread Adam Douglas
Are you sure you give access to this user from the machine to the database
server? Check IP address permissions and if the user has access to the
specific table and/or database in MySQL. Also check to make sure the
database server is setup to allow you access from your machine.. check the
MySQL and System log files they usually help to determine what went wrong.

 -Original Message-
 From: Sparky Kopetzky [mailto:[EMAIL PROTECTED]
 Sent: Saturday, March 29, 2003 9:12 PM
 To: [EMAIL PROTECTED]
 Subject: MySql Help needed
 
 
 Greetings!
 
 I am building an application in PHP and am creating a global 
 $connect_id for MySql. I have MySql on a separate machine and 
 am using the connect like this:
 
 $server = development.myservermachine.net;
 $username = myname;
 $password = mypassword;
 $connect_id = mysql_connect($server, $username, $password);
 
 All I get is 'Access denied for user '[EMAIL PROTECTED]' (Using 
 password:YES)
 
 Now, I know I'm in the DNS server for my system, and the 
 username and password are correct as I checked the User table.
 
 Any thoughts, ideas, etc. toward fixing this problem??
 
 I'd appreciate any help provided.
 
 Robin Kopetzky
 Black Mesa Computer/Internet Services
 
 
 

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



Re: [PHP-DB] Connect Microsoft SQL database with php on unix

2003-04-01 Thread Adam Voigt
You need to compile the FreeTDS library (freetds.org),
and on your PHP configure line, add --with-sybase=/usr/local/freetds
replacing the path for where you installed FreeTDS.

And yes, it says Sybase, but no, you don't use the sybase
functions, you can still use all the mssql_whatever functions.

On Mon, 2003-03-31 at 13:40, Greg Cirino wrote:
 Maybe mssql_connect()??
 
 www.php.net/mssql_connect
 
 
 The documentation indicates using sybase_connect (etc...) unless you
 are on a windows machine.
 
 But that doesn't work either as the sybase.so file seems to be
 non-existant (on my machine anyway)
 
 Regards
 Greg Cirino
 
 
 John W. Holmes [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  I would like to know the best way to connect to SQL database(which
 located
  on Microsoft SQL Server) from PHP(Located on Unix Server).
 
 Maybe mssql_connect()??
 
 www.php.net/mssql_connect
 
 ---John W. Holmes...
 
 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/
 
 
 
 
 
 -- 
 PHP Database Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
-- 
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc


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



Re: [PHP-DB] Problem with php/mysql and ISS on windows XPprofeesional

2003-06-03 Thread Adam Voigt
If your missing the dollar sign then add it, if your not, then
set error_reporting in your php.ini to E_ALL  ~E_NOTICE.



On Mon, 2003-06-02 at 10:52, Cal Evans wrote:
 Sounds like you left off a $ when using a variable.  I would take a look at
 line 158, find the variable name and make sure it's $name. Disabling the
 error will cause the message to go away but not fix the problem.
 
 humbly,
 =C=
 * Cal Evans
 * http://www.christianperformer.com
 * Stay plugged into your audience
 * The measure of a programmer is not the number of lines of code he writes
 but the number of lines he does not have to write.
 *
 
 - Original Message -
 From: Ahmed Abdelaliem [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, June 02, 2003 9:50 AM
 Subject: [PHP-DB] Problem with php/mysql and ISS on windows XP profeesional
 
 
  hi
  i use php and mysql on IIS server on windows xp professional
  when i select anything from the database i get this :
  Notice: Use of undefined constant name - assumed 'name' in
  d:\inetpub\wwwroot\EGYCDS\index.php on line 158
  Spy Hunter
 
  while evrything is going fine when i upload it on the web and it returns
  only Spy Hunter
 
  i think  i have to disable this eroor message only
  can any one tell me how i disable that error message
 
  _
  Help STOP SPAM with the new MSN 8 and get 2 months FREE*
  http://join.msn.com/?page=features/junkmail
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP-DB] Problem with php/mysql and ISS on windowsXPprofeesional

2003-06-03 Thread Adam Voigt
Ok, like I said, if it is an error (like a missing dollar sign) then
put the dollar sign in, therefore fixing the problem. However, if there
is not an error and he is simply using a variable and PHP is complaining
it's not defined, that's not a big deal, thats why it doesn't make the
code fail. It just means it noticed you accessed the variable $whatever
without making sure it was defined before you checked if it was false,
etc. No big deal, thats why the majority of PHP install's set the
error_reporting to ignore E_NOTICE, because it's completely safe to do
so.

On Mon, 2003-06-02 at 10:58, Cal Evans wrote:
 Again, changing the error reporting level will not fix the problem.  Since
 he is getting a warning AND his code is acting unexpectedly, he probably
 needs to concentrate on fixing the problem. (At least I assume that there is
 a problem. It sounds like there is from his description.)
 
 humbly,
 =C=
 
 * Cal Evans
 * http://www.christianperformer.com
 * Stay plugged into your audience
 * The measure of a programmer is not the number of lines of code he writes
 but the number of lines he does not have to write.
 *
 
 - Original Message -
 From: Adam Voigt [EMAIL PROTECTED]
 To: Ahmed Abdelaliem [EMAIL PROTECTED]
 Cc: [EMAIL PROTECTED]
 Sent: Monday, June 02, 2003 9:59 AM
 Subject: Re: [PHP-DB] Problem with php/mysql and ISS on windows
 XPprofeesional
 
 
  If your missing the dollar sign then add it, if your not, then
  set error_reporting in your php.ini to E_ALL  ~E_NOTICE.
 
 
 
  On Mon, 2003-06-02 at 10:52, Cal Evans wrote:
   Sounds like you left off a $ when using a variable.  I would take a look
 at
   line 158, find the variable name and make sure it's $name. Disabling the
   error will cause the message to go away but not fix the problem.
  
   humbly,
   =C=
   * Cal Evans
   * http://www.christianperformer.com
   * Stay plugged into your audience
   * The measure of a programmer is not the number of lines of code he
 writes
   but the number of lines he does not have to write.
   *
  
   - Original Message -
   From: Ahmed Abdelaliem [EMAIL PROTECTED]
   To: [EMAIL PROTECTED]
   Sent: Monday, June 02, 2003 9:50 AM
   Subject: [PHP-DB] Problem with php/mysql and ISS on windows XP
 profeesional
  
  
hi
i use php and mysql on IIS server on windows xp professional
when i select anything from the database i get this :
Notice: Use of undefined constant name - assumed 'name' in
d:\inetpub\wwwroot\EGYCDS\index.php on line 158
Spy Hunter
   
while evrything is going fine when i upload it on the web and it
 returns
only Spy Hunter
   
i think  i have to disable this eroor message only
can any one tell me how i disable that error message
   
_
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
   
   
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   
   
  --
  Adam Voigt ([EMAIL PROTECTED])
  Linux/Unix Network Administrator
  The Cryptocomm Group
 
 
  --
  PHP Database Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP-DB] Problem with php/mysql and ISS on windows XPprofeesional

2003-06-03 Thread Adam Voigt
Put single quote's around name in your record array, example:

Use:

$record['name']

Instead Of:

$record[name]


On Mon, 2003-06-02 at 11:04, Ahmed Abdelaliem wrote:
 here is the code i wrote
 i didn't miss the $ sign
 and it works fine on web
 but returns the error message when i use it on localhost
 
 
 ?
 @ $db = mysql_connect(localhost);
 mysql_select_db(cds);
 $test_tr = mysql_query(select name from newpcgames order by gameid desc 
 LIMIT 0,
 10);
 $test_tr1 = mysql_query(select name from newpcgames order by gameid desc 
 LIMIT 10,
 20);
 
 
 while($record = mysql_fetch_array($test_tr))
   {
 
   $record1= mysql_fetch_array($test_tr1);
 
 echo 
 TR bgColor=#475674
 TD onmouseover=\this.bgColor='00'\ 
 onmouseout=\this.bgColor='475674'\ bgColor=#475674 width=\50%\
 DIV align=leftFONT
 color=#ff size=1strong;
   echo stripslashes($record[name]);
   echo /strong/tdtd  /td;
   echo TD 
 onmouseover=\this.bgColor='00'\ onmouseout=\this.bgColor='475674'\ 
 bgColor=#475674 width=\50%\
 DIV align=leftFONT
 color=#ff size=1strong;
  echo stripslashes($record1[name]);
  echo /strong/td
   /tr ;
   }
 
 
   ?
 
 
 From: Cal Evans [EMAIL PROTECTED]
 To: Ahmed Abdelaliem 
 [EMAIL PROTECTED],[EMAIL PROTECTED]
 Subject: Re: [PHP-DB] Problem with php/mysql and ISS on windows XP 
 profeesional
 Date: Mon, 2 Jun 2003 09:52:21 -0500
 
 Sounds like you left off a $ when using a variable.  I would take a look at
 line 158, find the variable name and make sure it's $name. Disabling the
 error will cause the message to go away but not fix the problem.
 
 humbly,
 =C=
 * Cal Evans
 * http://www.christianperformer.com
 * Stay plugged into your audience
 * The measure of a programmer is not the number of lines of code he writes
 but the number of lines he does not have to write.
 *
 
 - Original Message -
 From: Ahmed Abdelaliem [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, June 02, 2003 9:50 AM
 Subject: [PHP-DB] Problem with php/mysql and ISS on windows XP profeesional
 
 
   hi
   i use php and mysql on IIS server on windows xp professional
   when i select anything from the database i get this :
   Notice: Use of undefined constant name - assumed 'name' in
   d:\inetpub\wwwroot\EGYCDS\index.php on line 158
   Spy Hunter
  
   while evrything is going fine when i upload it on the web and it returns
   only Spy Hunter
  
   i think  i have to disable this eroor message only
   can any one tell me how i disable that error message
  
   _
   Help STOP SPAM with the new MSN 8 and get 2 months FREE*
   http://join.msn.com/?page=features/junkmail
  
  
   --
   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
 
 
 _
 Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
 http://join.msn.com/?page=features/junkmail
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP-DB] Total Values with MySQL

2003-06-03 Thread Adam Voigt
SELECT SUM(ColumnName) AS total FROM table WHERE ColunName = '1';



On Mon, 2003-06-02 at 11:18, shaun wrote:
 Hi,
 
 Is it possible to get MySQL to total the values of a select statement, say
 'SELECT ColumnName FROM Table WHERE ColumnName = '1''
 
 Say I have three values in ColumnName all of '1' then can I get MySQL to
 return 3?
 
 Thanks for your help
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP-DB] Accessing MySql using Flash while using PHP as themiddleware

2003-06-25 Thread Adam Voigt
Might want to check out a article on devshed:

http://devshed.com/Client_Side/Flash/DataDrivenFlash/page1.html


On Wed, 2003-06-25 at 11:15, Ron Allen wrote:
 Does anybody have an idea how-to use Flash and PHP to access a MySql
 database. I know how to use PHP and mysql with no problem to pull info, but
 with Flash I am struggling.
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



Re: [PHP-DB] moving though an array..

2003-06-26 Thread Adam Voigt
One Thing:

Change $columns[] to $colums, example:

$columns = explode(',',$threadsColumn);


On Thu, 2003-06-26 at 10:23, Aaron Wolski wrote:
 Hi All,
  
 Hopefully someone here can point me in the right direction.
  
 I need to create a SELECT statement based on some criteria select and
 entered into a form.
  
 Form variables:
  
 $threadsColumn = manufactuer,colour;
 $string = n;
  
 Code:
  
 $columns[] = explode(,,$threadsColumn);
  
 $test = (;
  
 for ($i=0;$isizeof($columns);$i++) {
  
 $test .= $columns[$i]. %$string%;
  
 }
  
 $test .= );
  
 echo $test;
  
 What I am attempting to do is create a select statement that would look
 like (based on form variables):
  
 SELECT * FROM tablename WHERE (manufacturer LIKE %n% OR colour LIKE %n%)
  
 The information between ( and ) needs to be written in such a manner
 that it scales up or down in options.. depending on what was selected in
 the form.
  
 ANYONE have some thoughts?
  
 Oh.. when I echo the above code I get this: (Array %h%)
  
 Thanks!
  
 Aaron 
  
-- 
Adam Voigt ([EMAIL PROTECTED])
Linux/Unix Network Administrator
The Cryptocomm Group


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



<    1   2   3   >