Posts

Showing posts from January 3, 2019

fetching more than one row with long blob type through an exception called java.io.eofexception in andriod

Image
0 selecting more than one row from database through an exception java.io.EOFException: source exhausted prematurely in andriod please note that my image column is longblob I send the result to andriod code Please note again if I fetched any column with type int or var char it works correctly, longblob through this exception. this is my php code <?php require "conn.php"; $aa =$_POST["cid"]; $mysql_qry = "select * from cities where ID = '$aa'"; $result = mysqli_query($conn,$mysql_qry); $FinalArr = array(); $UserData ="-1"; $count =0; $mysql_qry2 = "select * from images "; $result2 = mysqli_query($conn,$mysql_qry2); while ( $row2 = mysqli_fetch_array($result2)) { if($row2["cityID"] == $aa) ...

Getting “Segmentation fault (core dumped)” after prompting user for input

Image
1 Switch statement results in "Segmentation fault (core dumped)" regardless of the case. I tried changing the data type of "command" but can't get any other result. char command; int temp; while(1) { printf("Enter command ('d'/'m'/'s'/'r'): "); scanf("%c", command); printf("n"); switch(command) { case 'd' : printf("display which employee (0-19)?n"); scanf("%i", temp); //display(temp); printf("displayed"); break; case 'm' : ...