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 opini...
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
Great content
ReplyDeleteThank you very much, i was searching for this for a long time .
ReplyDeleteVery nicely explained with all programs, thanks
ReplyDelete