Skip to main content

Transfer google play balance to Paytm, PhonePe, Google Pay or any UPI linked bank account.

To transfer google play balance, opinion rewards or gift cards to PayPal, Paytm, PhonePe, Google Pay or any UPI ID linked bank account , you can use QxCredit :Rewards Convertor app which is available on google play store: You will get back 80% of the google play balance. App link:  https://play.google.com/store/apps/details?id=qxcoding.qx_credit_reboot Follow these steps to transfer your play balance to paypal or UPI: 1) download app from play store. 2) login with your google account and phone number. 3) choose a token amount which you want to convert/transfer. 4) Enter your payout details.(UPI ID or PayPal Email) 5) wait for an acknowledgement mail form qxcredit containing information about your purchased token. 6) you will receive the amount within 3 days. 7) if you face any issues you can raise a query on website: https://qx-credit.web.app/#/contact_support About app: Introducing QxCredit : Rewards Converter Convert /Transfer or Exchange your Google Play Balance and opinion r

Link SQL Database in C/C++ program


For using sql database in C/C++ you need codeblocks (or any other editor) and sql server (xampp or other ).

After downloading and setting up the above files :
IN CODEBLOCKS:
you have to add library files (*.lib) in the link libraries under linker settings which can be accessed by compiler settings.



you can download the sql library file and sql header files from here :

and add the libmysql.a file under the link libraries as shown in the above screen shot.

Now ,you have to just add the header files you downloaded from above link to the directory:

codeblocks>mingw>include     //paste here





Now the codeblocks is completely configured for connecting sql server to the C/C++ program.

IN XAMPP:
Run the mysql service through the GUI control panel or directly run xampp>mysql_start.bat






Now insert the following code in codeblocks:

Code for SQL connectivity:

#include<stdio.h>
#include<mysql.h>
MYSQL *conn;
MYSQL_RES *res;
MYSQL_ROW row;
int main(int argc, char **argv)
 {   conn = mysql_init(NULL);
 /* Connect to database */
    if (!mysql_real_connect(conn, server,user, password, database, 0, NULL, 0)) {
       fprintf(stderr, "%s\n", mysql_error(conn));
       exit(1);
    }
    login();
 return(0);
 }

Here ,
*conn = connection variable used for connectivity with mysql
*res = used to store result returned by the mysql_query()
         > mysql_query() has to parameters:
            1) connection variable
            2) the query which is to be processed
row holds the number of rows in the result , returned  by the mysql_query() function.

The connection to mysql with the program is made by the mysql_real_connect() function:

mysql_real_connect(conn, server,user, password, database, 0, NULL, 0)

The above function will return non-zero value if an error occurs and will return 1 if connection to the database is successful

The parameters values are given below:


char server[] = "localhost";
char user[] = "root";
char password[] = ""; /* set me first */
char database[] = "proctors";//the database you want to connect

That's it !! you have successfully connected the sql server to your C program.

For passing query and obtain results to/from mysql database you may want to use the user defined functions (Created by me) given below :


void p_query(char *query){
     if(mysql_query(conn,query)){
             fprintf(stderr, "Error:%s\n", mysql_error(conn));
             getch();
             return;
     }
     res = mysql_use_result(conn);
     if(!res){printf("Succesfull\n\n\n");getch();}
     else output();
 }
The above function takes the query as argument and processes it to find whether it will modify the table  or give some results.
if the query give some results , then the output() function is called, which is defined below:


void output(){
     int c=mysql_num_fields(res),e=1;
    printf("MySQL Results from proctor database:\n");
    while ((row = mysql_fetch_row(res)) != NULL){
       e=0;
       for(int i=0;i<c;i++)
             printf("%s ", row[i]?row[i]:"NULL");
       printf("\n");
    }
    if(e==1)printf("No results found corresponding to given parameters\n");
    getch();
    mysql_free_result(res);
 }

This function will be called, if results are returned by the mysql_query() function.


if any doubts or queries please comment ðŸ™‚

Comments

  1. Thank you very much, i was searching for this for a long time .

    ReplyDelete
  2. Very nicely explained with all programs, thanks

    ReplyDelete

Post a Comment

Popular posts from this blog

Python and C++ program to implement multiplication of 2d array (Matrix multiplication)

Here, in this program we are going to implement matrix multiplication , suppose matrix 1 has dimensions:m*n and matrix 2 has dimensions :p*q for these two matrix to be multiplied we need to have the number of columns in matrix 1(n) equal to the number of rows in matrix 2(p), if the condition is satisfied then the result of multiplication will be a matrix of order m*q in multiplication the elements of the resultant matrix will be the sum of product of corresponding elements of row(of M1) and column(of M2) //first element in 1st row in given example: res[0][0]+=mat1[0][i] * mat2[i][0] where 0<i<n or p //second element in 1st row: res[0][1]+=mat1[0][i] * mat2[i][1] where 0<i<n or p and so on………… Example : Input : 1 2 3 1 4 5 6 2 7 8 9 3 Output : 14 32 50 Input : 4 3 4 2 4 1 1 1 Output : multiplication not possible n!=p Here goes the main execution part where the calculation is been done: for ( int i = 0 ; i < r1 ; i ++) for ( int

Transfer google play balance to Paytm, PhonePe, Google Pay or any UPI linked bank account.

To transfer google play balance, opinion rewards or gift cards to PayPal, Paytm, PhonePe, Google Pay or any UPI ID linked bank account , you can use QxCredit :Rewards Convertor app which is available on google play store: You will get back 80% of the google play balance. App link:  https://play.google.com/store/apps/details?id=qxcoding.qx_credit_reboot Follow these steps to transfer your play balance to paypal or UPI: 1) download app from play store. 2) login with your google account and phone number. 3) choose a token amount which you want to convert/transfer. 4) Enter your payout details.(UPI ID or PayPal Email) 5) wait for an acknowledgement mail form qxcredit containing information about your purchased token. 6) you will receive the amount within 3 days. 7) if you face any issues you can raise a query on website: https://qx-credit.web.app/#/contact_support About app: Introducing QxCredit : Rewards Converter Convert /Transfer or Exchange your Google Play Balance and opinion r

What is AI (Artificial Intelligence )? and its characteristics

Definition : Artificial intelligence  (AI) is the ability of a  computer program  or a  machine  to think and learn. It is also a field of study which tries to make computers "smart". They work on their own without being encoded with commands. Types of AI : REACTIVE MACHINES:  The most basic type of AI is purely reactive ,it does not store any memory of past or predict ( calculate ) future happenings. This type of AI is only applicable to specific applications and the principle is choosing the best decision among several options. examples: Deep Blue, IBM’s chess-playing supercomputer LIMITED MEMORY :  this type 2 kind of AI machines are distinct from reactive machine in such a way that it can make optimum decisions based on the past information ( data ). examples: self driving cars. THEORY OF MIND:  The understanding that people,creatures and objects can have thoughts or emotions which effect their own behavior. This point is the important divide