Jump to content

Search the Community

Showing results for tags 'multiple'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Welcome to PHP Freaks
    • Announcements
    • Introductions
  • PHP Coding
    • PHP Coding Help
    • Regex Help
    • Third Party Scripts
    • FAQ/Code Snippet Repository
  • SQL / Database
    • MySQL Help
    • PostgreSQL
    • Microsoft SQL - MSSQL
    • Other RDBMS and SQL dialects
  • Client Side
    • HTML Help
    • CSS Help
    • Javascript Help
    • Other
  • Applications and Frameworks
    • Applications
    • Frameworks
    • Other Libraries
  • Web Server Administration
    • PHP Installation and Configuration
    • Linux
    • Apache HTTP Server
    • Microsoft IIS
    • Other Web Server Software
  • Other
    • Application Design
    • Other Programming Languages
    • Editor Help (Dreamweaver, Zend, etc)
    • Website Critique
    • Beta Test Your Stuff!
  • Freelance, Contracts, Employment, etc.
    • Services Offered
    • Job Offerings
  • General Discussion
    • PHPFreaks.com Website Feedback
    • Miscellaneous

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Age


Donation Link

Found 4 results

  1. I asked this question before and I did receive the answer I was looking for. But now I realize something. It only works for the first result. Let me explain. I am using this API. https://block.io/api/simple/php $get_address = $block_io->get_transactions(array('type' => 'received', 'addresses' => $my_wallet)); $api_amount = $get_address->data->txs[0]->amounts_received[0]->amount; $api_recp = $get_address->data->txs[0]->amounts_received[0]->recipient; $api_trans_id = $get_address->data->txs[0]->txid; $api_sender_id = $get_address->data->txs[0]->senders; These are variables above i am using to check if something is true or not. For eg. The form below. I want to check if the $api_trans_id matches the the post id I submit below. if($api_trans_id == $_POST['trans-id']) { echo 'Success'; } else { echo 'Fail.'; } <form action="" method="post"> <input type="text" name="trans-id" value="" maxlength="1084" /> <input type="submit" name="submit" value="Submit" /> </form> The above works if the first result in the json array below has the same post id or else it fails. I want to loop through ALL the json arrays and try to match the post id($_POST['trans-id']). Below are the 3 array results to give you an example. The first txid is "41d9afcc73da63c45674088411460116cfefe324cc7a6f5fcb267d9f584adf73". If I submit this same id as the post id in the form, it'll be success full. But if I use the 2nd or 3rd txid below, it will fail. So how can I change this "$api_trans_id = $get_address->data->txs[0]->txid;" so that it looks for all three txid instead of only the first one? { "status" : "success", "data" : { "network" : "BTC", "txs" : [ { "txid" : "41d9afcc73da63c45674088411460116cfefe324cc7a6f5fcb267d9f584adf73", "from_green_address" : false, "time" : 1496877627, "confirmations" : 3080, "amounts_received" : [ { "recipient" : "1QFaAYB4r8sk7MG3beb7yY4R21t9JrnMwK", "amount" : "0.00200000" } ], "senders" : [ "2EqvPUTwjUuon6c2a6YxBreJtBkkZD5fsp" ], "confidence" : 1.0, "propagated_by_nodes" : null }, { "txid" : "2f72d4dd97234937ddf6e8174b17a9a421ba35bbfb6fa40cfeb6ac92db6ce032", "from_green_address" : false, "time" : 1491675979, "confirmations" : 12338, "amounts_received" : [ { "recipient" : "1QFaAYB4r8sk7MG3beb7yY4R21t9JrnMwK", "amount" : "0.00010000" } ], "senders" : [ "3L98MQZKvwNo21fFpY7RJ9HYfYdv62XpYz" ], "confidence" : 1.0, "propagated_by_nodes" : null }, { "txid" : "fce58f0cb1d32c1ed7c27825c41753ce98323771bd931f0a0f99b6294d9ee642", "from_green_address" : false, "time" : 1491672301, "confirmations" : 12341, "amounts_received" : [ { "recipient" : "1QFaAYB4r8sk7MG3beb7yY4R21t9JrnMwK", "amount" : "0.00010000" } ], "senders" : [ "4L98MQZKvwNo21fFpY7RJ9HYfYdv62XpYz" ], "confidence" : 1.0, "propagated_by_nodes" : null }, ] } }
  2. Say I have a records table with multiple records. There could be multiple records with the same name but different amounts. For Eg. Looking at the table below, the results should retrieve newest record-1 and record-2 because their amount is equals to or greater than 5.00. Record-3 is not selected because it falls below 3.00. record_id record_name record_amount 1 record-1 4.00 2 record-1 3.00 3 record-2 2.00 4 record-1 5.00 5 record-2 6.00 6 record-3 3.00 $get_records = $db->prepare("SELECT record_id, record_name FROM records WHERE record_amount >= :record_amount ORDER BY record_id DESC"); $get_records->bindValue(':record_amount', 5.00); $get_records->execute(); $result_records = $get_records->fetchAll(PDO::FETCH_ASSOC); if(count($result_records) > 0) { foreach($result_records as row) { $record_id = $row['record_id']; $record_name = $row['record_name']; echo $record_name; } } Currently the query above outputs ALL the rows that matches the >=. What I want to do is select only ONE row of each unique record name that matches the criteria. And that row is typically the last row that was inserted. So the output would be like only these two. How do I do that? 4 record-1 5.00 5 record-2 6.00
  3. Say I have 5 users. Each user will receive their payment based on their individual percentage. For eg. User 1: 5% User 2: 10% User 3: 15% User 4: 15% User 5: 5% Now say I have a total of $100. I want to divide the $100 among the 5 users. But the users with higher % will receive a higher amount than the the ones with lower %. How would I calculate this?
  4. Hi Everyone. I need help. I need to find or make a software/page with the table which would allow multiple users to edit and put in values simultaneously. So, how i see it is that there is a table in front of several people, with certain data, e.g. different car names, and when one person puts a tick, as in to say, yes i want tht car (others will know the meaning), all the other users using the software or being on the page would instantaneously see that there is a tick next to this car for example, and beside the tick there would be an initial or a full name of the person who put the tick which would be filled in the cell automatically and all the users would be able to see it in realtime. Also an undo feature is good to have, in case a tick is put next to the wrong cell (e.g. car). I have tried using the Microsoft Excel to be shared by several users, however it proved itself to be inefficient as it cannot update realtime, the user has to save the document... Several of these tables might be needed, however, it would be handy if one person would create some similar table, they would be able to share it with other people for them all to use it simultaneously. Also if different people could have different colors assigned to them Something along the lines of: Please Help. I have very little knowledge in programming and php, have had some experience with html - if this helps at all...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.