Forum Home
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    WIP: Market

    Projects
    6
    14
    5413
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      groll Regular Member last edited by

      not sure what you actually want tot do as this delete the first entry in koolio table.

      I think there is a link between the transaction and the escrow address in some way here I put a column transaction that should be map to the transaction ID txid. but llocans is true we need to know the context and the table to come to a correct solution

      [code]$query = "SELECT address FROM " . $DBPrefix . “koolio where transaction= " $txid " ORDER BY newid ASC LIMIT 1”;
      $res = mysql_query($query);
      $row = mysql_fetch_assoc($res);
      $koolio_addy = $row[‘address’];
      mysql_query("DELETE FROM " . $DBPrefix . “koolio WHERE address='” . $koolio_addy . “'”);[/code]

      1 Reply Last reply Reply Quote 0
      • Bushstar
        Bushstar last edited by

        I want an SQL query that gets an address from the koolio table and deletes it before someone else gets the same address. So I need to return an address and delete it from the Koolio table in the same query.

        [code]$query = "SELECT address FROM " . $DBPrefix . “koolio where transaction= " $txid " ORDER BY newid ASC LIMIT 1”;
        $res = mysql_query($query);
        $row = mysql_fetch_assoc($res);
        $koolio_addy = $row[‘address’];
        mysql_query("DELETE FROM " . $DBPrefix . “koolio WHERE address='” . $koolio_addy . “'”);

        Add $koolio_addy to a new user account[/code]

        Donate: 6hf9DF8H67ZEoW9KmPJez6BHh4XPNQSCZz

        1 Reply Last reply Reply Quote 0
        • I
          Ilocans last edited by

          Could you use a stored procedure or a function in mysql.

          I do not have mysql so it would be something like
          [code]
          CREATE PROCEDURE simpleproc (param INT) returns int
          BEGIN
          SELECT @add=address FROM koolio where transaction= param ORDER BY newid ASC LIMIT 1
          Delete from koolio where address = @add
          return @add
          END
          [/code]

          Another solution would be to lock the table by adding a column status per example that you initialise to 0:
          [code]
          $query = "UPDATE " . $DBPrefix . "koolio set status = 1 where transaction= " $txid "
          mysql_query($query);
          $query = "SELECT address FROM " . $DBPrefix . “koolio where transaction= " $txid and status = 1 " ORDER BY newid ASC LIMIT 1”;
          $res = mysql_query($query);
          $row = mysql_fetch_assoc($res);
          $koolio_addy = $row[‘address’];
          mysql_query("DELETE FROM " . $DBPrefix . “koolio WHERE address='” . $koolio_addy . “’ and status = 1”);
          [/code]

          1 Reply Last reply Reply Quote 0
          • Bushstar
            Bushstar last edited by

            Thanks. I’m not that familiar with MySQL so stored procedures is news to me :)

            I really should spend some time on MySQL as I’m sure I could make it do a lot of the work I do in where I am accessing the data from.

            Donate: 6hf9DF8H67ZEoW9KmPJez6BHh4XPNQSCZz

            1 Reply Last reply Reply Quote 0
            • U
              UKMark last edited by

              Not sure if this info will help you…

              http://dev.mysql.com/doc/innodb-plugin/1.0/en/innodb-create-index-concurrency.html

              1 Reply Last reply Reply Quote 0
              • I
                Ilocans last edited by

                If you need help to review/optimize code or do implementation, I think I could help you.

                1 Reply Last reply Reply Quote 0
                • W
                  wesphily last edited by

                  .

                  1 Reply Last reply Reply Quote 0
                  • Bushstar
                    Bushstar last edited by

                    [quote name=“wesphily” post=“17454” timestamp=“1372119845”]
                    sql injection is not too terribly difficult. If we plan to put currency in the mix then we should definitely spend extra time on eliminating the possibility.
                    [/quote]

                    Before we put a wallet on this site I will get a professional company to look over the code. For now there is a lot to do on the user experience front especially for sellers.

                    I had no idea how much work this system needed to get it working as you would expect. The site looks like it handles multi buys from a single auction but it barely does and it generates an erroneous auction when the items are all sold. These issues are now resolved in the new release. I thought I was fixing a Buy Now bug but I ended up recoding the Buy Now system.

                    Donate: 6hf9DF8H67ZEoW9KmPJez6BHh4XPNQSCZz

                    1 Reply Last reply Reply Quote 0
                    • Bushstar
                      Bushstar last edited by

                      I’m waiting on Koolio to get his site ready. I have not been wasting this time. For the Koolio escrow address we validate the seller’s Feathercoin address so that only valid address will work. I have finished the multi buy system today which gives us all the functionality we presumed was already in the system. The problem with the Buy Now auction system is that on the surface it appeared to be working.

                      [b]If anyone has to time to work through the site and find bugs please let me know.[/b]

                      You can access the development site by the link below with the details given below. Registrations from the live system work here. New registrations do not require validation and has recaptcha which we currently do not have!

                      https://www.feathercoin.com/auction_dev/
                      Username: admin
                      Password: Plokij12!

                      Donate: 6hf9DF8H67ZEoW9KmPJez6BHh4XPNQSCZz

                      1 Reply Last reply Reply Quote 0
                      • J
                        justabitoftime last edited by

                        Anyone that’s used the escrow, please report your experience.

                        1 Reply Last reply Reply Quote 0
                        • W
                          wesphily last edited by

                          .

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post