RE: [PHP-DB] Resolution detect and redirect

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

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


[PHP-DB] Problem with non-Character-fields with MSSQL70

2001-02-28 Thread FreakyMark

Hi there,

I can easily get results of my tables when i try to get character-type
fields but when I try to get a numeric-type field i receive the following
messages:

Warning: Sybase: fieldname field not found in result in filename.php on line
32

Line32 tells me: $Var = mssql_result($res, $i; "fieldname");

Can anybody help me?

Many thanks

Martin



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




[PHP-DB] MySQL novice: database not updating ... LONG

2001-02-28 Thread V e r b a l

I'm trying to modify a script I'm using. I've gotten so far that it
displays my change and updates to old setting. I've added the required
field in the database and all setting but my new addition are being
updated.

Anyone sees anything strange here, or failing that what should I look
for in the code?

V e r b a l

8< -- c o d e ->8
Now, in the snippets I've included below. There are several more of
these (
  
Manage Users:
  
  
  
>
  
  
>
  


// This is what I've included

  
Manage Clients:
  
  
  
>
  
  
>
  
   

// Ends my addition

The update is (as I understand) called by this statement ..

  
  
  
  
  

And the routine called cmdSelectDepartments

looks like this:


  if(isset($cmdSelectDepartments)) { 
  $query = "UPDATE security SET ";
  $query .= "s_firstname='$txtFirstname', ";
  $query .= "s_lastname='$txtLastname', ";
  $query .= "s_password='$txtPassword', ";
  $query .= "s_email='$txtEmail' ";
  $query .= "WHERE s_user='$txtUsername';";
  $mysql_result = mysql_query($query, $mysql_link);
  if ($mysql_result) { }
  
  $query = "UPDATE security SET ";
  $query .= "s_register_new_tickets='$u_register_new_tickets', ";
  $query .= "s_authorize_tickets='$u_authorize_tickets', ";
  $query .= "s_assign_tickets='$u_assign_tickets', ";
  $query .= "s_update_tickets='$u_update_tickets', ";
  $query .= "s_delete_tickets='$u_delete_tickets', ";
  $query .= "s_open_closed_tickets='$u_open_closed_tickets', ";
  $query .=
"s_view_unauthorized_tickets='$u_view_unauthorized_tickets', ";
  $query .=
"s_view_department_tickets='$u_view_department_tickets', ";
  $query .= "s_add_categories='$u_add_categories', ";
  $query .= "s_delete_categories='$u_delete_categories', ";
  $query .= "s_add_departments='$u_add_departments', ";
  $query .= "s_delete_departments='$u_delete_departments', ";
  $query .= "s_manage_users='$u_manage_users', ";
  $query .= "s_add_parts='$u_add_parts', ";
  $query .= "s_manage_clients='$u_manage_clients' "; //my addition
  $query .= "WHERE s_user='$txtUsername';";
  $mysql_result = mysql_query($query, $mysql_link);


As I said. All other settings are being updated, but mine (marked //my
addition).

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




Re: [PHP-DB] MySQL novice: database not updating ... LONG

2001-02-28 Thread Miles Thompson

Three things I see:
1.   You seem to be assigning hard-coded values to u_mange_users, and "0" , 
as it is last, will always win. I think, I alsway have to mess with them a 
bit. That's why checking your SQL is important.
2.  You are embedding a semi-colon in SQL statements. That's not necessary.
3.  Have you echoed the SQL statement to see if it is what you expect? Add 
"echo $query;" to print the query out to your browser. If you can, check it 
at the MySQL command line.

Hope this helps - Miles

At 12:19 PM 2/28/01 +, V e r b a l wrote:
>I'm trying to modify a script I'm using. I've gotten so far that it
>displays my change and updates to old setting. I've added the required
>field in the database and all setting but my new addition are being
>updated.
>
>Anyone sees anything strange here, or failing that what should I look
>for in the code?
>
>V e r b a l
>
>8< -- c o d e ->8
>Now, in the snippets I've included below. There are several more of
>these (
>
>   
> Manage Users:
>   
>  if ($u_manage_users==1) {
> $manageusersgrant="checked";
>   }
>   else {
> $manageusersdontgrant="checked";
>   }
>   ?>
>   
> $manageusersgrant;?>>
>   
>   
> $manageusersdontgrant;?>>
>   
> 
>
>// This is what I've included
> 
>   
> Manage Clients:
>   
>if ($u_manage_clients==1) {
> $manageclientsgrant="checked";
> }
> else {
> $manageclientsdontgrant="checked";
> }
>?>
>   
> >
>   
>   
> $manageclientsdontgrant;?>>
>   
>   
>
>// Ends my addition
>
>The update is (as I understand) called by this statement ..
>
>   
>   
>   name="cmdSelectDepartments">
>   
>   
>
>And the routine called cmdSelectDepartments
>
>looks like this:
>
>
>   if(isset($cmdSelectDepartments)) {
>   $query = "UPDATE security SET ";
>   $query .= "s_firstname='$txtFirstname', ";
>   $query .= "s_lastname='$txtLastname', ";
>   $query .= "s_password='$txtPassword', ";
>   $query .= "s_email='$txtEmail' ";
>   $query .= "WHERE s_user='$txtUsername';";
>   $mysql_result = mysql_query($query, $mysql_link);
>   if ($mysql_result) { }
>
>   $query = "UPDATE security SET ";
>   $query .= "s_register_new_tickets='$u_register_new_tickets', ";
>   $query .= "s_authorize_tickets='$u_authorize_tickets', ";
>   $query .= "s_assign_tickets='$u_assign_tickets', ";
>   $query .= "s_update_tickets='$u_update_tickets', ";
>   $query .= "s_delete_tickets='$u_delete_tickets', ";
>   $query .= "s_open_closed_tickets='$u_open_closed_tickets', ";
>   $query .=
>"s_view_unauthorized_tickets='$u_view_unauthorized_tickets', ";
>   $query .=
>"s_view_department_tickets='$u_view_department_tickets', ";
>   $query .= "s_add_categories='$u_add_categories', ";
>   $query .= "s_delete_categories='$u_delete_categories', ";
>   $query .= "s_add_departments='$u_add_departments', ";
>   $query .= "s_delete_departments='$u_delete_departments', ";
>   $query .= "s_manage_users='$u_manage_users', ";
>   $query .= "s_add_parts='$u_add_parts', ";
>   $query .= "s_manage_clients='$u_manage_clients' "; //my addition
>   $query .= "WHERE s_user='$txtUsername';";
>   $mysql_result = mysql_query($query, $mysql_link);
>
>
>As I said. All other settings are being updated, but mine (marked //my
>addition).
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




[PHP-DB] SQL STATEMENT?????

2001-02-28 Thread Scott Fletcher

Hi!

I am looking for a SQL Statement that would allow me to remove a column
from the table in the database.  Just give me what you know and I'll check
out the SQL Reference I have for the database.  Don't worry about what type
of database do I have, that's what hte SQL Reference is for.  (It came with
this database software).

Thanks,
 Scott



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




AW: [PHP-DB] SQL STATEMENT?????

2001-02-28 Thread Udo Oehmig

scott,

try " alter table drop()"

-u

-Ursprüngliche Nachricht-
Von: Scott Fletcher [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 28. Februar 2001 14:50
An: [EMAIL PROTECTED]
Betreff: [PHP-DB] SQL STATEMENT?


Hi!

I am looking for a SQL Statement that would allow me to remove a column
from the table in the database.  Just give me what you know and I'll check
out the SQL Reference I have for the database.  Don't worry about what type
of database do I have, that's what hte SQL Reference is for.  (It came with
this database software).

Thanks,
 Scott



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



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




RE: [PHP-DB] SQL STATEMENT?????

2001-02-28 Thread Wesley Choate

alter table remove column_name

Or something along those lines.

Hope that helps a little bit.

Wesley Choate
Daymark Group
Programmer / Web Developer
Phone:  (501)-968-4038 X2204
Email:  [EMAIL PROTECTED]
Web:  www.daymarkgroup.com


> -Original Message-
> From: Scott Fletcher [SMTP:[EMAIL PROTECTED]]
> Sent: Wednesday, February 28, 2001 7:50 AM
> To:   [EMAIL PROTECTED]
> Subject:  [PHP-DB] SQL STATEMENT?
> 
> Hi!
> 
> I am looking for a SQL Statement that would allow me to remove a
> column
> from the table in the database.  Just give me what you know and I'll check
> out the SQL Reference I have for the database.  Don't worry about what
> type
> of database do I have, that's what hte SQL Reference is for.  (It came
> with
> this database software).
> 
> Thanks,
>  Scott
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

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




RE: [PHP-DB] md5

2001-02-28 Thread Krznaric Michael

I know there is an issue about encrypting an already encrypted
string, or encrypting something twice.  I believe it is against the law in
the US for some algorithms (like MD5).  They [they] have to be able to crack
your stuff.

Maybe someone can confirm?

How does this relate to your problem?  Well maybe md5 thinks your
string has already been encrypted.

Mike


-Original Message-
From: bryan [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 4:48 PM
To: Joe Brown; db
Subject: Re: [PHP-DB] md5


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

Probably just me though.  Thanks for the advice.

bryan


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


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



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

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




[PHP-DB] INSERT dump (mySQL)

2001-02-28 Thread Fredrik Stark

I have a problem with an INSERT into a mySQL database (3.23.32),
the insert comes from a dump from another mySQL database (3.23.24-beta) generated by 
phpMyAdmin 2.1.0

See messy code below:

INSERT INTO member_info
VALUES ( '2', '', 'Blah blah blah', 
'a:13:{i:0;s:2:\"35\";i:1;s:2:\"27\";i:2;s:1:\"1\";i:3;s:1:\"2\";i:4;s:2:\"37\";i:5;s:1:\"8\";i:6;s:1:\"4\";i:7;s:1:\"7\";i:8;s:2:\"10\";i:9;s:2:\"15\";i:10;s:2:\"14\";i:11;s:2:\"43\";i:12;s:2:\"44\";}',
 '2001-02-28 10:36:14', '2001-02-02 11:11:11', '0', 
'a:2:{i:0;s:1:\"6\";i:1;s:1:\"5\";}');

Generates:
MySQL said: 
You have an error in your SQL syntax near ''a:13:{i:0' at line 1

Anyone have a clue?
/fredrik


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




[PHP-DB] Solid Database Installation

2001-02-28 Thread David Foster

There have been a number of mails about the SQLParamData error when starting
Apache after installing the solid database installation. Here is a list of
the actions we had to take to get solid working correctly with PHP 4.04pl1 I
hope it saves some time since it cost us a lot !

Solid version is the current linux version 3.5 with glibc2

In the include directlry of solid sqlunix.h change
#include 
to
#include 

Seems like the call to wcstr.h is an old call. The compilation will then
work.

In the solid lib directory make symlinks like this:
ln –s socl2x35.a libsocl2x35.a
ln –s socl2x35.so libsocl2x35.so

The standard installation doesnt include these. Not 100% sure they are
really needed but we got linker errors.

Finally put the path to those libs in LD_LIBRARY_PATH or edit
/etc/ld.so.conf (don’t forget to run ldconfig after).

Now the PHP problem. After solving these problems you get the SQLParamData
error when loading apache. Seems like there is a script error in ./configure
There is a test in this file for the existence of the solid files after
which there are several echo statements if there is a problem (you can
pretty much search for these in the file). On the last echo statement the
"else" clause is on the same line and is ignored. Unfortunately the else
clause contains the linker statements and is ignored. Hence the error.
Putting the else on a new line fixes the problem. You can see if you have
this problem when you run configure. You may get the message "Finding Solid
Library ..." but no error and nothing after the dots.

Hope this helps.

David Foster ([EMAIL PROTECTED])


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




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

2001-02-28 Thread JJeffman

The statement exists in MySQL and as far as I know works perfectly.
I couldn't try it because my ISP had disabled it for security matters. But
it works as described on the MySQL manual .

HTH.

Jayme.

-Mensagem Original-
De: Miles Thompson <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: terça-feira, 27 de fevereiro de 2001 19:58
Assunto: [PHP-DB] Anyone tried a MySQL load data infile statement?


> In the Python language, witht he appropriate module, one can construct a
> string like:
>
> "load data infile 'pwlist.txt' replace into table subscriber fields
> terminated by '\t' optionally enclosed by '"' lines terminated by '\r\n'
",
>
> pass it to the cursor.execute() function and it completes.
>
> I've tried this, assingning the string to $sql, and then issuing
> mysql_query( $sql ), all in the hope that magic would happen. It hasn't. I
> guess what I was sort of counting on was that mysql_query(), despite its
> name and obvious function might also be a general purpose execution tool
> for MySQL commands.
>
> Anyone tried anything similar? It's a really cool way to quickly update a
> database from a, in this case, tab-delimited file.
>
> Miles Thompson
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




Re: [PHP-DB] Resolution detect and redirect

2001-02-28 Thread JJeffman

The PHP function "get_browser()" extract many of the client browser
characteristics but not the screen resolution !
PHP experts tells not to use JavaScript so you have two choices:
1st. Do not make a good adaptive design, with horizontal scroll bars or
tile background images, and tell the user this page was made thinking he or
she must use the resolution you choose at design time or;
2nd. Take the risk of use JavaScript "window.screen.width" and
"window.location" properties to evaluate and redirect the user to the well
graphic designed pages.

HTH

Jayme.

-Mensagem Original-
De: Matthew Cothier <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: terça-feira, 27 de fevereiro de 2001 12:42
Assunto: [PHP-DB] Resolution detect and redirect


> I am lookign for a piece of code that will detect the resolution of the
user
> and return a page dependant on that i.e - The table will be adjusted to
suit
> that.
>
> Is there a script where I can detect what the resolution is, and also
> redirect to a page depending on what resolution they are using?
>
> Thanks in advance for any help!
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


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




RE: [PHP-DB] Resolution detect and redirect

2001-02-28 Thread Matt Williams


> The PHP function "get_browser()" extract many of the client browser
> characteristics but not the screen resolution !
> PHP experts tells not to use JavaScript so you have two choices:
> 1st. Do not make a good adaptive design, with horizontal
> scroll bars or
> tile background images, and tell the user this page was made
> thinking he or
> she must use the resolution you choose at design time or;
> 2nd. Take the risk of use JavaScript "window.screen.width" and
> "window.location" properties to evaluate and redirect the user to the well
> graphic designed pages.
>

Or why not use percentage widths??

M@


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




[PHP-DB] Selecting number of news items on frontpage

2001-02-28 Thread Matthew Cothier

I have a homepage which has a news headline system. Bascially via form the 
admin of the site can submit news which appears on the front page, the only 
problem is the news just keeps coming and I have a front page with too many 
headlines on.

How can I make it so that say 7 articles appear on the front page and the 
rest can be accessed through some sort of archive?

Perhaps a link underneath these articles to the archive?

And the actual archive a page with the headlines listed that they can click 
on and view the story, the headlines listed in date order.

How would I do this?
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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




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

2001-02-28 Thread Rick Emery

Yep.  This one got me.

/var/lib/mysql had these permissions:   drwx--

Changed to:   drwx-r-x-r-x

Worked like a charm.

Many thanks to Joe and Rick

rick

-Original Message-
From: Joe Brown [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 27, 2001 10:24 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP-DB] Can't connect to local MySQL server error


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

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

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



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

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




Re: [PHP-DB] Selecting number of news items on frontpage

2001-02-28 Thread Bill Zeller

Hey,

If you're using Mysql to store the items, you could
use the Limit statement to limit the number of items
displayed. If you're using the file system it'd
probably be a little more difficult, but not
impossible. For example, if the news items were stored
in a text file with one entry per line, you could just
use file() to convert the file to an array and then
loop 7 times--grabbing the first 7 elements (or news
items) of the array.

Best Regards,
Bill Zeller
--- Matthew Cothier <[EMAIL PROTECTED]>
wrote:
> I have a homepage which has a news headline system.
> Bascially via form the 
> admin of the site can submit news which appears on
> the front page, the only 
> problem is the news just keeps coming and I have a
> front page with too many 
> headlines on.
> 
> How can I make it so that say 7 articles appear on
> the front page and the 
> rest can be accessed through some sort of archive?
> 
> Perhaps a link underneath these articles to the
> archive?
> 
> And the actual archive a page with the headlines
> listed that they can click 
> on and view the story, the headlines listed in date
> order.
> 
> How would I do this?
>
_
> Get Your Private, Free E-mail from MSN Hotmail at
> http://www.hotmail.com.
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> 


__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

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




Re: [PHP-DB] Selecting number of news items on frontpage

2001-02-28 Thread Miles Thompson

Matthew,

Do you want to be told how, or want to read an interesting article on just 
this, including  PHP script to build your archives. It's one of the early 
PHP tutorials -- try a search on "php movie database".

I adapted code from that for my own archive, although I run a shell script, 
logged in as root, to actually make the directory and copy the files. That 
has mostly to do with security, although it could probably be overcome by 
having the archive directory owned by whatever name the webserver runs as.

Miles

PS Ah, just found it: 
http://www.webreview.com/pub/2000/02/11/php/index.html  That will take you 
to their archive. Good luck!!

PPS The shell script just prompts for a directory name and creates the 
directory, then copies all files from the web site root into the newly 
created directory. A second script publishes the new files.


Have fun!!!





At 04:13 PM 2/28/01 +, Matthew Cothier wrote:
>I have a homepage which has a news headline system. Bascially via form the 
>admin of the site can submit news which appears on the front page, the 
>only problem is the news just keeps coming and I have a front page with 
>too many headlines on.
>
>How can I make it so that say 7 articles appear on the front page and the 
>rest can be accessed through some sort of archive?
>
>Perhaps a link underneath these articles to the archive?
>
>And the actual archive a page with the headlines listed that they can 
>click on and view the story, the headlines listed in date order.
>
>How would I do this?
>_
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP-DB] Selecting number of news items on frontpage

2001-02-28 Thread Matthew Cothier




>From: [EMAIL PROTECTED] (Miles Thompson)
>To: [EMAIL PROTECTED],[EMAIL PROTECTED]
>Subject: Re: [PHP-DB] Selecting number of news items on frontpage
>Date: Wed, 28 Feb 2001 17:06:07 -0400
>
>Matthew,
>
>Do you want to be told how, or want to read an interesting article on just
>this, including  PHP script to build your archives. It's one of the early
>PHP tutorials -- try a search on "php movie database".
>
>I adapted code from that for my own archive, although I run a shell script,
>logged in as root, to actually make the directory and copy the files. That
>has mostly to do with security, although it could probably be overcome by
>having the archive directory owned by whatever name the webserver runs as.
>
>Miles
>
>PS Ah, just found it:
>http://www.webreview.com/pub/2000/02/11/php/index.html  That will take you
>to their archive. Good luck!!
>
>PPS The shell script just prompts for a directory name and creates the
>directory, then copies all files from the web site root into the newly
>created directory. A second script publishes the new files.
>
>
>Have fun!!!


Basically I am using PHP and MySql, is there no way of just grabbing the 
last 7 articles entered into the database and displaying them and then 
linking to a page with the rest of them (ie. All the others minus the last 7 
- the ones on the front page)?


What loop code would I need for this, its a friends site that I have just 
started :

www.sunsetbeachuk.com   Thats the url if it helps to take a look, as you 
will see the front page just grows and grows as more news is added
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


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




[PHP-DB] php-db Digest 26 Feb 2001 19:12:23 -0000 Issue 477

2001-02-28 Thread inter7


php-db Digest 26 Feb 2001 19:12:23 - Issue 477

Topics (messages 6951 through 6963):

Re: Server side or client side?
6951 by: Uioreanu Calin
6953 by: JJeffman

Re: OCI 8 and rowid cause SIGSEGV
6952 by: Thies C. Arntzen

Re: cookies, email and passwords
6954 by: JJeffman

Re: Join causing Error?
6955 by: Johnny Withers

Oracle 8i questions
6956 by: Chris Murtland
6958 by: Andreas Karajannis
6959 by: Joe Brown

Re: Interbase + PHP
6957 by: Meir kriheli

The dreaded 12154!!
6960 by: Kevin Porter
6962 by: Kevin Porter

Updating a Grid of Data
6961 by: Chris Andrew

Re: Can't connect to local MySQL server error
6963 by: Rick Emery

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--



Hello,

I see here a problem in jsclient-side generated code.
Suppose 1st list (category) has 100 elements and second
list, the products (ex.) has each 200 elements.

a code that prevents selecting in 1st list the category would
select all 100 x 200 elements and use js to display the correct
list.

This is very expensive. The link solution seems much better

Regards,
Uioreanu Calin






That's what I've been telling to who asked about filling drop down lists at
run time: When the amount of data is small you can generate JavaScript
arrays to hold it otherwise you MUST reload the page to run your php script
to fill up drop down lists.

HTH.

Jayme.


-Mensagem Original-
De: Uioreanu Calin <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: segunda-feira, 26 de fevereiro de 2001 06:54
Assunto: Re: [PHP-DB] Server side or client side?


> Hello,
>
> I see here a problem in jsclient-side generated code.
> Suppose 1st list (category) has 100 elements and second
> list, the products (ex.) has each 200 elements.
>
> a code that prevents selecting in 1st list the category would
> select all 100 x 200 elements and use js to display the correct
> list.
>
> This is very expensive. The link solution seems much better
>
> Regards,
> Uioreanu Calin
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>





On Sat, Feb 24, 2001 at 05:43:58PM +0100, Sven Voigt wrote:
> On Friday 23 February 2001 17:03, you wrote:
> > I suppose the authors never concieved a replacement parameter for select
> >
> > specification.
> >
> > try:
> > > $sql =3D "select foo, bar, rid from masterdata WHERE rid=3D:rid"
> >
> > You need to loose the colon ":" or place it to the right of a where cla
> > use.
> 
> Sorry to bother this list again, but I don't get the point... :-(
> 
> I need the rowid for later updates by a user form. So how can I issue a
> select clause with 'WHERE rid=3D:rid'? Don't I need this for the *update*
> clause???

rowids in 8i are an opaque data-type. so you need to convert
them to something human-readable 1st (btw the column is
called rowid and not rid).

select ROWIDTOCHAR(rowid), name from test;

ROWID  NAME
-- 
AAAGBFAAIAAAB/tAAA müller

update test set name = 'hallo' where ROWID ='AAAGBFAAIAAAB/tAAA';

> 
> This is what I thought of:
> 1.) select foo, bar, rid from masterdata
> 2.) let user select data set to update with 'update.php?rowid=ROWID'
> 3.) write changes to database: update foo, bar values (FOO, BAR) where
> rowid=ROWID'

usually one uses his/her self-defined primary key for that
purpose. 

> 
> And what's about that colon? Is there any special meaning in PHP?

no - in oracle sql the colon indicate that you are using a
placeholder (= bind-variable);

> 
> I'd highly appreciate your help/answer! Many thanks in advance

BTW i cannot reproduce the reported crash - could you please
try the latest snapshot from snaps.php.net and report if you
still see this crash?

thanx,
tc




Have a look on PHP manual there is good information on mail functions,
setcookie function, and other stuff.

HTH

Jayme.
-Mensagem Original-
De: Matthew Cothier <[EMAIL PROTECTED]>
Para: <[EMAIL PROTECTED]>
Enviada em: domingo, 25 de fevereiro de 2001 17:13
Assunto: [PHP-DB] cookies, email and passwords


> Thanks!
>
> Is there anyone who can actually give me little bits of code that I need
> cause I am in a rush with this
> _
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: 

[PHP-DB] php-db Digest 27 Feb 2001 08:38:46 -0000 Issue 478

2001-02-28 Thread inter7


php-db Digest 27 Feb 2001 08:38:46 - Issue 478

Topics (messages 6964 through 6974):

dns script
6964 by: Liz Bander
6968 by: php3.developersdesk.com

Re: Can't connect to local MySQL server error
6965 by: Brunner, Daniel
6967 by: Rick Emery

Re: onMouseOver & onMouseOut
6966 by: Ron Brogden
6969 by: php3.developersdesk.com

Fatal error: Call to undefined function: () in add2.php on line 11
6970 by: jim and lois flaherty
6973 by: Joe Brown

array awry
6971 by: Keith Spiller
6972 by: Rolf Hopkins
6974 by: CC Zona

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--



I'm not sure that this is entirely on topic, but does anyone have a simple 
DNS script gleaning from MySQL 3.23 that I could take a look at?  Right now 
we're doing the manual entry thing, but it's going to get old fast.  If you 
can even direct me to an appropriate source, that would be great.

Thanks,

Liz





Addressed to: Liz Bander <[EMAIL PROTECTED]>
  [EMAIL PROTECTED]

** Reply to note from Liz Bander <[EMAIL PROTECTED]> Mon, 26 Feb 2001 14:51:07 -0500
>
> I'm not sure that this is entirely on topic, but does anyone have a
> simple DNS script gleaning from MySQL 3.23 that I could take a look
> at?  Right now we're doing the manual entry thing, but it's going to
> get old fast.  If you can even direct me to an appropriate source,
> that would be great.



I don't understand what you want to do.  Please give a few more details
on what you want.


This is probably as good a place as any for the question though.




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




Hello...

Try this instead...


Grant ALL ON Database_name.* to user@localhost IDENIFIED BY "password";

You can use Grant whatever ON Database_name.*...As well

The .* after the Database_name will allow all tables to be accesed by
the users, on that Database...

It worked great for me...

Dan



> --
> From: Rick Emery
> Sent: Monday, February 26, 2001 1:16 PM
> To:   '[EMAIL PROTECTED]'
> Subject:  RE: [PHP-DB] Can't connect to local MySQL server error
> 
> I'm also having trouble connecting to the MySQL server.
> 
> I can connect as root, but not as a user from the command line.  When
> connect to the mysql server as ROOT, I've granted all privileges to
> the user
> using 'user@localhost' and 'user@"%" '.  Still no luck.  I'm using
> MySQL on
> Redhat Linux.  I'm having same problem connecting via a
> mysql_connect(---) call in PHP.
> 
> What do I need to do to allow user interaction for MySQL?
> thanks
> 
> rick
> 
> Richard L. Emery
> IT Sr. Project Manager
> 
> 
> "There is no 'trying'...
> There is only 'Do' or 'Not Do' "
> 
> 
> -Original Message-
> From: Brunner, Daniel [mailto:[EMAIL PROTECTED]]
> Sent: Friday, February 16, 2001 5:05 PM
> To: '[EMAIL PROTECTED]'
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: [PHP-DB] Can't connect to local MySQL server error
> 
> 
> Hello...
> 
> Do a netstat -vatp
> To see if mysql is up and listening on your TCP. And it will give your
> PID/Program name as well...
> 
> I remember reading something about if the mysql.sock didn't work...you
> needed to do something with mysql...I'll look into it this
> weekend.
> 
> If nobody can help you out sooner
> 
> Well good luck...
> 
> Dan
> 
> 
> 
> > --
> > From:   Chris Weiss
> > Reply To:   [EMAIL PROTECTED]
> > Sent:   Friday, February 16, 2001 4:37 PM
> > To: [EMAIL PROTECTED]
> > Subject:[PHP-DB] Can't connect to local MySQL server error
> > 
> > Help!
> > I'm experimenting with several of the PHP based WebDatabase front
> ends
> > and
> > am getting the following errors from all of them:
> > 
> > "Warning: Can't connect to local MySQL server through socket
> > '/var/lib/mysql/mysql.sock' (111) in
> /home/httpd/html/pub/mainfile.php
> > on
> > line 9
> > Unable to select database"
> > 
> > I've tried the following:
> > [root@casadelove pub]# telnet localhost 3306 |strings
> > Trying 127.0.0.1...
> > Connected to casadelove.com.
> > Escape character is '^]'.
> > 3.23.27-beta
> > $Gu=m/>.
> > Connection closed by foreign host.
> > 
> > The databases being requested do exist and are populated with the
> > default
> > data and WebMin (Perl-based web administration program) accesses the
> > test
> > databases just fine.
> > 
> > This is on a RH6.2 system with Apache 1.3.14 and PHP 4.0.4.
> > 
> > This strikes me as something really stupid that I'm missing, anyone
> > have any
> > bright ideas where to look?
> > 
> > 
> > -- 
> > PHP Database Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]

Re: [PHP-DB] Selecting number of news items on frontpage

2001-02-28 Thread Miles Thompson

Matthew,

My MySQL syntax is a little rusty. But if you define tables as type 
"MYISAM" and implement a primary key like this "nArticleKey integer 
unsigned not null auto_increment primary key" you will have a steadily 
incrementing count on your articles, as you add them, with no intervention.

You could then issue as select statement like " select * from articles 
limit 7 order by nArticleKey descending"  (maybe it should be "top" instead 
of "limit", check your MySLQ syntax) and feed those to the front page.

Store your lowest of the retrieved article numbers, in $lownum, then for 
the archive, "select * from articles where nArticleKey < $lownum descending".

Wrangling the results out to the page, etc. I leave to you.

Maybe you've done all of this already and I'm just wasting keystrokes? Let 
me know how it goes, I will go have a look at the page.

Regards - Miles

At 10:28 PM 2/28/01 +, Matthew Cothier wrote:



>>From: [EMAIL PROTECTED] (Miles Thompson)
>>To: [EMAIL PROTECTED],[EMAIL PROTECTED]
>>Subject: Re: [PHP-DB] Selecting number of news items on frontpage
>>Date: Wed, 28 Feb 2001 17:06:07 -0400
>>
>>Matthew,
>>
>>Do you want to be told how, or want to read an interesting article on just
>>this, including  PHP script to build your archives. It's one of the early
>>PHP tutorials -- try a search on "php movie database".
>>
>>I adapted code from that for my own archive, although I run a shell script,
>>logged in as root, to actually make the directory and copy the files. That
>>has mostly to do with security, although it could probably be overcome by
>>having the archive directory owned by whatever name the webserver runs as.
>>
>>Miles
>>
>>PS Ah, just found it:
>>http://www.webreview.com/pub/2000/02/11/php/index.html  That will take you
>>to their archive. Good luck!!
>>
>>PPS The shell script just prompts for a directory name and creates the
>>directory, then copies all files from the web site root into the newly
>>created directory. A second script publishes the new files.
>>
>>
>>Have fun!!!
>
>
>Basically I am using PHP and MySql, is there no way of just grabbing the 
>last 7 articles entered into the database and displaying them and then 
>linking to a page with the rest of them (ie. All the others minus the last 
>7 - the ones on the front page)?
>
>
>What loop code would I need for this, its a friends site that I have just 
>started :
>
>www.sunsetbeachuk.com   Thats the url if it helps to take a look, as you 
>will see the front page just grows and grows as more news is added
>_
>Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
>
>--
>PHP Database Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]


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




Re: [PHP-DB] Selecting number of news items on frontpage

2001-02-28 Thread Beau Lebens


>You could then issue as select statement like " select * from articles 
>limit 7 order by nArticleKey descending"  (maybe it should be "top" 
>instead of "limit", check your MySLQ syntax) and feed those to the front page.

select * from articles order by nArticleKey desc limit 7
although a better way would be to include a date stamp on the article 
(which i see you already have, and assuming you have done it in mysql 
friendly - "Y-m-d H:i:s" then you can do this and get them in reverse 
chronological order (newest article first)

select * from articles order by date desc limit 7
and on the "archive page"

select * from articles order by date desc limit ,7 or something like that, 
see the mysql documentation under the select syntax


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




[PHP-DB] Tricky database query involving two tables

2001-02-28 Thread Ken

I have a tricky database query I can't figure out how to write.  I have a PHP app 
using MySQL that does a query like this:

(main query)
select * from A left join B on something
where B.thing = "1"

This gets me everything in A where its corresponding element in B has a certain 
attribute.

What I want is to be able to now do this:
select * from A
where A not in the result set of the main query

I can't just do:
select * from A left join B on something
where B.thing != "1" or B.thing is NULL

because things in A might occur more than once in B, (or not at all in B, but that's 
covered by the NULL part), and so this query would return things in A that I already 
got in the main query.

Is there a way to do this in MySQL?  Or do I have to just query everything, and then 
have the skipping logic be in PHP?  I'd love to encapsulate this in a query.  Would it 
involve subqueries (something I know that MySQL doesn't directly support)?

Let me know if I need to be more clear or specific in my question.

Thanks!

- Ken
[EMAIL PROTECTED]


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




Re: [PHP-DB] Tricky database query involving two tables

2001-02-28 Thread Ron Brogden

At 09:50 PM 2/28/2001 -0500, you wrote:
>Is there a way to do this in MySQL?  Or do I have to just query 
>everything, and then have the skipping logic be in PHP?  I'd love to 
>encapsulate this in a query.  Would it involve subqueries (something I 
>know that MySQL doesn't directly support)?

The part that seems to be missing here is that you are note limiting the 
relationships between table A and table B, you are just slapping them 
together.  There should probably be a field that you use to lock rows 
together between the tables:

select a.foo,b.bar from A left outer join B ON a.foo=b.foo where b.bar=1

If you have known relationship between the tables shared between the 
queries then selecting "b.bar!=1" should actually work.

Hard to get real specific though without seeing a "real" query and table 
schema.

Cheers

-
Island Net AMT Solutions Group Inc.  Telephone:  250 383-0096
1412 Quadra  Toll Free:1 800 331-3055
Victoria, B.C.   Fax:250 383-6698
V8W 2L1  E-Mail:[EMAIL PROTECTED]
Canada   WWW:   http://www.islandnet.com/
-


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




Re: [PHP-DB] Tricky database query involving two tables, much more detail

2001-02-28 Thread Ken

At 07:04 PM 2/28/01 -0800, Ron Brogden wrote:
>At 09:50 PM 2/28/2001 -0500, you wrote:
>>Is there a way to do this in MySQL?  Or do I have to just query everything, and then 
>have the skipping logic be in PHP?  I'd love to encapsulate this in a query.  Would 
>it involve subqueries (something I know that MySQL doesn't directly support)?
>
>The part that seems to be missing here is that you are note limiting the 
>relationships between table A and table B, you are just slapping them together.  
>There should probably be a field that you use to lock rows together between the 
>tables:
>
>select a.foo,b.bar from A left outer join B ON a.foo=b.foo where b.bar=1

Thanks, Ron...
Actually, I am doing that (I had implied it when I said "on something"):
select * from A left join B on something
where B.thing != "1" or B.thing is NULL

The problem, again, is that this gets me things that are in B that don't have a 
certain attribute...but what I want is things that aren't in the set of (has certain 
attribute).

Here's some sample data to illustrate what I'm talking about:

Table A:
fields: nameid, name
1, Joe
2, Mary
3, Bob
4, Jim

Table B:
fields: thing, nameid (used in join)
10, 1
10, 2
11, 1
11, 3

My main query was this (and I'll add the details this time):
select name from A left join B on A.nameid = B.nameid
where B.thing = "10"

This returns:
Joe, Mary

Now, what I want is to be able to have a query that returns everything in A that 
DIDN'T come back in that query.  Specifically:
Bob, Jim

I can't query where B.thing != "10", because that will include the "11,1" entry, which 
gets me "Joe", which I don't want.

The bad query I listed before (again, with details added) is:
select name from A left join B on A.nameid = B.nameid
where B.thing != "10" or B.thing is NULL

This gets me:
Joe, Bob, Jim

No good, since I don't want Joe there.

The issue, again, is that it's not good enough to say what doesn't match the "thing" 
in B.  Things may occur again and again in B, both matching "thing" and not matching 
"thing".  I want to know specifically the opposite of the first query (i.e. the 
opposite of "what does match the "thing" in B"), which is a bit different.

Thanks much for any help!  I've been going nuts trying to solve this one.

- Ken
[EMAIL PROTECTED]


>If you have known relationship between the tables shared between the queries then 
>selecting "b.bar!=1" should actually work.
>
>Hard to get real specific though without seeing a "real" query and table schema.


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




[PHP-DB] Storing sensitive information in MySQL

2001-02-28 Thread Dreamvale

Hi,

I have a situation where some sensitive information need to be stored in a
database, eg salary, medical info, etc.

the data are only meant for the particular employees.

however, the root user will have all the power to retrieve both the key
(stored somewhere either in a file, or php scripts, or db), and the database
too, hence can (not necessary will) read the sensitivie information.

is there any techniques, or products to be used to solve this problem?

thanks.


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




[PHP-DB] How would you have liked to have invested in Yahoo when it was still a year old?

2001-02-28 Thread Jess Ragaza

or eBay? Well, I missed it too. Now we all have the
great opportunity not only to relive it but also to
help usher the real Information Highway and be
rewarded for our vision and courage!

Our company, Internet Architecture, Inc. will offer
free web contents: true beginning applications of the
Information Highway utilizing the much wider bandwidth
of Digital Subscriber Line (DSL) and cable modems,
supported by the latest satellite technology.

These will be cutting edge technologies in virtual
reality and spatial navigation applications: (1) "What
if ..." situations for business and other decision
making applications. This will be done in conjunction
with the state of the art in artificial intelligence
and virtual reality; (2) Spatial Navigation of
roadways/topography/weather several miles ahead of
your trip. This will be done with the help of
Geopositioning and Weather Satellites; (3) floor plans
and other design utilities.

We have just successfully presented for the first time
to a group of investors in Florida and will continue
our pilgrimage as explained below to solicit financing
for cutting edge technologies in virtual reality and
spatial navigation applications.. Watch for the 
announcement in our web site for a presentation close
to you. This will give you a unique opportunity to
network and prospect as well.

We are now presenting in the Washington, D.C./Virginia
areas in February and March, 2001. We can be reached
at 703-204-9698 and 321-287-7280.

Attached is my recent offer of the same Multimedia
presentation to individuals in key cities along my
way. If you or anybody you know in your area may be
interested, please respond. Or feel free to transmit
this e-mail to anybody who may be interested.

---
---


To: …
Cc: …

Subject: Now that my associate, the brilliant Mr. Fred
Servillon, and I have given a fairly successful
inaugural presentation of our company,

to a group of investors in Tampa, I have decided to
begin my expedition. First to the Washington, D.C. and
Virginia areas per invitation of Amos and Ate Emelina
Camp (Ate Emelina, my first cousin, is the eldest
among the Ragaza clan), to the New York/New Jersey
areas, to Chicago, to Fort Madison, Iowa, per
invitation of my second cousin Johnny and his lovely
wife, Dr. Cristina Rabo, and finally to the
Sunnyvale/Palo Alto/Santa Clara areas.

I will be leaving Florida on Saturday, January 27,
2001.

Can you possibly arrange to have another such
presentation in your area. It will be a multimedia
presentation using MS PowerPoint superimposed against
the already money-making web site

 http://www.internetarchitecture.com/

It will be not only educational (history of the
internet, our competition Yahoo*, a new organizational
concept that is similar to the internet, a bird's eye
view of project development - systems planning,
systems analysis, ..., etc.) but also creatively
enjoyable. In Tampa we had so much fun (and
boisterous, belly-aching laughter at times**)
investigating various ... what if ... situations and
the audience was actually actively participating in
the solution and spontaneous humor!

*  This is a compelling story about the little train
that could ... or David and GOLIATH ... check our
business plan for introducing the following unproven
free contents: virtual reality and spatial navigation,
the real beginnings of the information highway.

** For example, one of the attendees loved the
pulsating heart in the logo at the top of the
menu/index on the left. When we visited the Playboy
store, one of the occupants in our virtual mall,
another attendee (a well known community leader here)
noticed that suddenly the heart stopped beating! GOD
really appears in mysterious ways?!


Just below is the formal invitation we sent to the
attendees of our inaugural presentation in Tampa.

---





I am wholeheartedly inviting each one of you to an
introductory presentation of Internet Architecture,
Inc. It will be held at 10 A.M., on Saturday, January
13, 2001, at Esther Gianan's house. In consonant with
the high technology nature of our business, we will
arrange to have a multimedia showing using MS
PowerPoint and the Internet.

This will be an exciting, let alone educational,
affair for the people of a great city who gave me all
the opportunities to be, therefore I am:

 1. Beyond Yahoo! The true beginning of the
Information Highway

 2. Content providers are where the big money will
be made

 3. Internet Growth

 4. The demise of Yahoo

 5. The demise of eBay

 6. BUSINESS PLAN

 7. For the calendar year 2000

 8. For the calendar year 2001 

 9. Local Area Network that will house the
company's domain and enterprise system

10. Financial Projection

11. PLAN for such BOLD MISSION:
 Build Satellite Local Branches, a new