How to order by with group by in mysql

One way to do this is with a bunch of while loops and hitting the DB over and over, or selecting a crap load of data and just dropping out everything but the most recent inventory count manually. Both of these are viable solutions with a lot of overhead, but what I really want is just a silver bullet SQL statement that does this for me. I think I have it.

What I initially envisioned was:

SELECT *
FROM INVENTORY
ORDER BY vendors_no,
timestamp DESC
GROUP BY vendors_no,
product_no Continue reading

Convert hex data to image

Convert image from hex value
first of we have convert image into het to binary64 encode
than  after we have convert binary to image .

here hex data display below if when data pass in $_post form than plese remove hex data and just simple pass the data like
$_data=$_post[‘fieldname’];
Continue reading

paypal pro intrigation with php

This class can be used to send payment requests to Paypal payments Pro API.

It can send HTTP request to the Paypal API Web servers to execute a given API operation passing a list of name and value pairs. It can also send requests to the sandbox API web servers.

The class returns the response name value pairs as an associative array.

Continue reading

PayPal Integration with PHP and MySQL

Step 1 – Setup PayPal Account

Sign up for a PayPal account if you don’t already have one. Select an appropriate account type, either Personal or Business.

Once you have a registered PayPal account your account must be setup correctly to use IPN.

Select ‘edit profile’ from your PayPal account and check the following settings.

  • Under ‘Selling Preferences’ >> ‘Instant Payment Notification Preferences’
  • Under ‘Selling Preferences’ >> ‘payment receiving preferences’
    • Block payments from users who pay with echeck. (This is because these will not be instant payments)
  • Under ‘account information’ >> ‘email’
    • Note down your primary email address. This email will be visible to users so make it a professional one. User’s may feel apprehensive about sending money to an e-mail address with the domain ‘hotmail.com’ or ‘Yahoo.com’ etc… Continue reading