[PHP-DB] PHP/MySQl Consultation

2001-08-24 Thread Randy Johnson

I am in need of someone that is very good at PHP and MySQL to view my
scripts and discuss with me in detail on how to speed up my scripts and how
to speed up mysql some.   if you are interested please send me credentials
and rates ASAP  please send them to [EMAIL PROTECTED]


Thank you,


Randy
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.268 / Virus Database: 140 - Release Date: 8/7/2001


-- 
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] RE: Doing multiple updates

2001-01-30 Thread Randy Johnson

Does the Connection ID change if I use persistent connection through PHP
using mysql_pconnect()?

Is it possible to retrieve CONNECTION_ID() this though PHP?



-Original Message-
From: The Tilghman [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 29, 2001 4:31 PM
To: 'Randy Johnson'
Subject: RE: Doing multiple updates


web@machine:admin> select connection_id();
+-+
| CONNECTION_ID() |
+-+
| 395 |
+-+
1 row in set (0.00 sec)

web@machine:admin>

--
"There cannot be a crisis today.  My schedule is already full."
 --Henry Kissinger

> -Original Message-
> From: Randy Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Monday, January 29, 2001 14:50
>
> I have decided to implement the "soft-lock" schema below.  I
> cannot use the
> userID as the value for the lock.  Is there any other unique
> number that can
> be generated that I could use.  I am thinking about using a
> session_ID in
> PHP?  Any suggestions/Comments??
>
> Randy
>
> -Original Message-
> From: Cal Evans [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 24, 2001 4:10 PM
>
> My recommendation (and there are probably many people who
> will disagree with
> me) is to use a "soft-lock" schema.
>
> In your account table, add a field named lockedBy. I usually
> add a field
> named lockedAt also as a timestamp.
>
> the basic flow is this:
>
> 1: Check to see if the record has something in lockedBy
> -NO-
> 2: Update the record with your userID
> 3: Check to see if there record has something in lockedBy and
> it is you.
> -YES-
> 4: you have successfully soft-locked the record for update.
> Go ahead and
> make your update
> 5: update the record to remove the lock.
>
> WARNING: This system assumes that you have control over all
> processes that
> access the database.  If there is a chance that someone will
> come in and be
> able to modify the data outside of your code then they can bypass your
> checks and modify the data.
>
> In many DBMSs (not sure yet about MySQL) record locks keep
> people for even
> seeing the data and some (M$ SQL) used to lock whole tables
> to do a single
> update. (sux big time)
>
> -Original Message-
> From: Randy Johnson [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 24, 2001 2:48 PM
>
> I am creating a mock site that has a money balance  that
> people can login
> and pretend to pay money for stuff online via my site.
>
> I am using php with mysql to implement this.
>
> How do I make sure that a balance for a particular account is
> (locked) so
> only 1 spend for that account can happen at one time?
>
> for example my php script grabs the balance from the payer account and
> receiver account. How do I make sure that the balance is locked so the
> balance is read before the updated transaction occurs causing
> the person to
> spend money that he/she doesn't have.
>
> I hope I have provided enough explanation for you guys to
> point me in the
> right direction.
>


-- 
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] query error

2001-01-25 Thread Randy Johnson

When I run any kind of query this is the value of result  Resource id #2

Example
$result= mysql_query (" Select * from ACCT_TBL ") or die
("Error".mysql_error());

print result;


any ideas?

randy


-- 
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] Username/Password retrieval

2001-01-12 Thread Randy Johnson

Is the following statement the best way to handle a username/password
validation
$username and $password are form fields

$result="";
$result= mysql_query (" Select password from ACCT_TBLE where (ACCT_NUM =
'$username' and PASSWORD='$password')");

Now my question is will result be equal to "" if the query statement doesn't
return any data?

thanks

randy


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