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

jQuery Ajax With JSON Response

have been lately developing a lot with Javascript in a very interesting project which is about wines. In that project we are creating a software with HTML5, Javascript, CSS and on the serverside with PHP and MySQL. I’ll post more about that project propably at fall when we release the project. It is going to be huge. This post is about some of the technologies we are using on that project.

On this project I have learned to use jQuery. It is a Javascript library to ease the development of Javascript based websites and offers massive framework for frontend web development. One major part of our project is Ajax, Asynchronous JavaScript and XML. In common language you can you can load data into website without refreshing it.

On this post I will show an example of how to do Ajax with jQuery and how to process multidimensional JSON data table coming in through Ajax. 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

Latest top 6 datepicker

Bootstrap DatePicker

The Twitter Bootstrap Datepicker is actually an extension of the original plugin by Stefan Petre. He has gone back to rework the styles which include default classes right out of the Twitter Bootstrap stylesheet. The plugin homepage features a lot of unique demos which are simply stunning. They look nicer using the typical Bootstrap interface designs.

glDatePicker

When it comes to interface design the glDatePicker plugin has one of the best. You can include this plugin just like you would any other sample code. The jQuery selector will tie onto an existing input field and the calendar will appear directly beneath this area. All you need to include is the default stylesheet and their JavaScript plugin file. Continue reading

Add DISQUS Comment System In Blogger

Add DISQUS Comment System In Blogger
Integrating DISQUS In Blogger
After telling you the information of this comment form, now you may want to integrate it in your blog and that’s the topic of our today’s post. But without the information the post looks like straw meal and we’ve added some spices as information. Not funny ? Well, let’s begin the tutorial.

Go To Disqus >> Click On “Get This On Your Site” Button.
There You Will See The Registration Form. Fill All The Fields To Sign Up.

Continue reading