i have a database table with fields mobno1 and mobno2, first i would like store all the values of field mobno1 into var1 and field mobno2 into var2 by using comma seperator and pdo. my code is as follows. $pdo = Database::connect(); $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $sql = "SELECT mobno1,mobno2 FROM custreg"; $q = $pdo->prepare($sql); $q->execute(); $data = $q->fetch(PDO::FETCH_ASSOC); $mobile_number1=$data['mobno1']; $mobile_number2=$data['mobno2']; Database::disconnect(); $message = urlencode($tempmsg); // Prepare data for POST request $data = "user=".$cpuser."&password=".$cppass."&mobiles=".$mobile_number1.",".$mobile_number2."&sms=".$message."&senderid=".$cpsender; // Send the POST request with cURL $ch = curl_init('http://msg.sendsms.com/sendsms.jsp'); //note https for SSL curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); //This is …

Member Avatar
Member Avatar
+0 forum 6

The foll code gives o/p as 2310103 28 Now my doubt is why here 10 is printed two times although i m passing t=6 for the d parameter?? #include <stdio.h> #include <string.h> int f(int a, int b, int c,int d,int e) { printf("%d%d%d%d%d \n",a,b,c,d,e); return a+b+c+d+e; } main() { int t; printf("%d",f(2,(1,(2,(3))),t=10,t=6,3),6); }

Member Avatar
Member Avatar
-1 forum 4

Is it possible to replace commas and spaces with commas in c#? I'm fresh in c# and am looking for guidance. Any help is appreciated! **Before:** Deleting 11 files.ABC: Total Time = 01:16:30, Remaining Time = 00:00:00 **After:** Deleting,11,files,ABC: Total,Time,01:16:30,Remaining,Time,00:00:00

Member Avatar
Member Avatar
+0 forum 5

Could someone help me with this? ins.CommandText = " INSERT INTO CoupleTbl (acntId, kasal, spouseName) " & "SELECT (acntId, " & dtpMarriage.Value & " , '" & txtSpouseName.Text & "') FROM AccountsTbl INNER JOIN " & "CoupleTbl ON AccountsTbl.acntId = CoupleTbl.acntId);" ins.CommandType = CommandType.Text ins.Connection = con ins.ExecuteNonQuery() MsgBox("Record Inserted") error says : **Syntax error (comma) in query expression '(acntId, 5/17/2013 , 'Last , First, Middle')'**

Member Avatar
Member Avatar
+0 forum 4

I am trying read CSV files in a C program on an AIX system. I am having problems getting fscanf to recognize the comma delimeter. I have read previous posts on this issue, and used the techniques dicussed in those threads, but I am still having the issue. Specifically, this problem was in a thread from a year ago, and the solution was to remove the comma using %*c on integer/decimal fields, and adding a mask for string fields, i.e., %[^ \t\n\r\v\f,]%*c. I have tried that, but I still am not getting the fscanf to work. It reads all of …

Member Avatar
Member Avatar
+0 forum 5

[COLOR="Green"][CODE]Private Sub Text1_Change() Text1 = Format(Text1, "#,###") Text1.SelStart = Len(Text1.Text) End Sub[/CODE] This code formats the textbox value to include a comma for every 3 digits to the left. Problem is, it doesn't allow to type decimals like 3,000,000.50 What can I do?[/COLOR]

Member Avatar
Member Avatar
+0 forum 17

Hey I have an assignment to get a number from the user and print it as a string with commas in the correct space. For example if the number is 13904 it should read 13,904 or 1005 should read 1,005. I have to do this recursively. Working on my pseudo-code I had two ideas and I got stuck on both ideas. My first idea was to take the number as a variable and enter it into a character array then add a comma in the necessary spots, this seemed easier so it is what I went with. But I could …

Member Avatar
Member Avatar
+0 forum 17

Hi.. I have a file with title output.dat.format of this file is as follows [CODE] 0 0.00E+00 0.00E+00 -2.00E-02 9.48E+02 1 0.00E+00 0.00E+00 -1.80E-02 9.48E+02 [/CODE] yes,Thats right.without any comma between.(just tab space) i need to create a file from this output.dat which has form similar to [CODE] 0,9.48E+02 0,9.48E+02 [/CODE] i.e the first and last column separated by comma and no white space in the entire line...I tried to code this by creating dictionary...i am unable to get the required output PS:the initial file 1.e output.dat has 10,000 line in a format mentioned above

Member Avatar
Member Avatar
+0 forum 4

Hi i got this progamm working fine it is supposed to read a comma delimited text file store as an array and the output a formatted version The problem is its outputting something really weird I dont know why. [B]The text file it is supposed to read[/B] [code=text]Darwin,3,33 Darwin,1,11 Darwin,6,66 Darwin,4,44 Darwin,5,55 Brisbane,2,222 Brisbane,1,111 Brisbane,6,666 Brisbane,3,333 Sydney,1,101 Sydney,2,202 Sydney,3,303 Sydney,6,606 Sydney,5,505 Sydney,4,404 Perth,3,313 Perth,4,414 Perth,5,515[/code] [B]THE CODE[/B] [CODE]#include <stdio.h> #include <string.h> #include <conio.h> #include <stdlib.h> int main() { char *fname,*str,ch,cityname[5][12]; int monthnum,rainfall,pos,monthvalues[5][6],flag,i,j,cpos,npos=0,count=0; FILE *fp; //File Pointer fp=fopen("CityRain.txt","r+"); if(fp==NULL) { printf("Cannot input file\n"); getch(); return 0; } for(i=0;i<5;i++) strcpy(cityname[i],""); for(i=0;i<5;i++) for(j=0;j<6;j++) …

Member Avatar
Member Avatar
+0 forum 10

Hello All, I have a very simple search cursor that is selecting from a table a list of names in order to query a database. It was working fine until I encountered a name with an apostraphe in it. O'Brien for instance. The search cursor is very basic. [CODE] inCur = gp.SearchCursor(myFeatureClass2,"COLLECTED_BY = '" + str(Name) + "'", "", "", "DATE_COLLECTED A") [/CODE] The term Name is retrieved from a list of values. When run it gets to O'Brien in the list and says that a value cannot be found. I know this is happening because of the single quotes …

Member Avatar
Member Avatar
+0 forum 4

I'm working with VB.Net. I have imported some data into the Data Set. I have four columns of data. [CODE] [Column 1]This is a test[/Column 1] [Column 2]This is a comma, Test.[/Column 2] [Column 3]This is a double quote " test.[/Column 3] [Column 4]This is a comma, quote " test.[/Column 4] [/CODE] * Ignore the Pseudo-Tags, they're just to show column start/end: I want to export this Data Set Table to a CSV. I want to maintain cell/column integrity. I am using Double Quotes around my "cell contents" to delineate text. This works just fine. When I open the file …

Member Avatar
Member Avatar
+0 forum 1

Hi, Could someone please tell me how to read from a CSV file? Also, how to update (write) to a CSV file? Thanks, -Ashton.

Member Avatar
Member Avatar
+0 forum 2

The End.