Feathercoin daemon and wallet production version 0.17.0.2

WIP: Market


  • | Tip Bushstar

    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]


  • | Tip Ilocans

    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]


  • | Tip Bushstar

    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.


  • | Tip UKMark


  • | Tip Ilocans

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


  • | Tip wesphily

    .


  • | Tip Bushstar

    [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.


  • | Tip Bushstar

    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!


  • | Tip justabitoftime

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


  • | Tip wesphily

    .