Ryze - Business Networking Buy Ethereum and Bitcoin
Get started with Cryptocurrency investing
Home Invite Friends Networks Friends classifieds
Home

Apply for Membership

About Ryze


The PHP developers network

Top [This Network is not currently active and cannot accept new posts]
<- Previous Next ->

610 hits
Nov 04, 2003 6:55 pm re: Dilemma
Kevin Fry
Use the following in a php script to check weather or not the account number is already in the database

if (sql_num_rows(sql_query("select ACCOUNTNUMBER from DATEBASETABLE where ACCOUNTNUMBER='$ACCOUNTNUMBER'", $dbi), $dbi) > 0) $stop = "ERROR: ACCOUNT NUMBER ALREADY USED"; > Will Hanke wrote: > I have a two-parter that maybe someone can help me with... >

>Situation:
>I have a client who wants to input new customers into his database. I've written a PHP form which allows him to do so.
>In the account number field, he can either type in the number, or have it auto-assigned. >

>Problem:
>When the client adds the info to the form and hits Submit... >

>1. How can I pull the list of account numbers, and verify that the one he entered is not already assigned? >

>2. How can I assign a 6-digit account number if he chooses auto-assign without duplicating an existing acct. number? >

>will >

Private Reply to Kevin Fry (new win)





Ryze Admin - Support   |   About Ryze



© Ryze Limited. Ryze is a trademark of Ryze Limited.  Terms of Service, including the Privacy Policy