Hello I have an SQL query that i want to concatenate the fields and display it in a way that those concatenated fields will be displayed first row will have 4 columns,second row will also have 4 columns....etc. for instance the query `SELECT imageurl, caption, template FROM template; The Result imageurl caption template image001 cap001 temp001 image002 cap002 temp002 image003 cap003 temp003 image004 cap004 temp004 image005 cap005 temp005 image006 cap006 temp006 image007 cap007 temp007 image008 cap008 temp008 I want it to be displayed this way cap001 cap002 cap003 cap004 image001 image002 image003 image004 temp001 temp002 temp003 temp004 cap005 cap006 cap007 …

Member Avatar
Member Avatar
+0 forum 4

Hi Everyone, Got a really strange problem with a mysql select query not displaying results in select dropdown. I have a small db table id,position,name and I am trying to display just the names where the position is GK Here is my query $result_dglass = mysql_query("select name from team where position like '%gk%' order by id Asc"); The strange thing is, It looks like the drop down is being populated with the correct amount of results, But the text is not being displayed. I have tried populating the same dropdown with a different query to a different table and that …

Member Avatar
Member Avatar
+0 forum 4

hello. I have a table populated by name. The names are links when clicked will pop up a form for editing. each input (for editing) is populated by the equal value from database but im having trouble with one particular text box. this text box is for date of birth and it only shows part of the data. for example in the database dob is 2 January 1993 in the popped up form it only shows 2. the rest of the input are fine and display full data its just this one. php code: <?php $contact = $_GET['contact']; require "connection.php"; …

Member Avatar
Member Avatar
+0 forum 13

#include <iostream> #include <cstdlib> using namespace std; // function prototype for add int add (int x, int y); int sub (int q, int r); int mul (int s, int t); int divi (int u, int v); int main () { int a,b; char ch; loop:cout<<"ENTER CHOICE OF OPERATION: + - OR * / and q to quit"; cout<<'\n'; cin>>ch; int result; if(ch!='+'&&ch!='-'&&ch!='*'&&ch!='/'&&ch!='q') { cout<<"wrong input"; } else { if(ch=='+') { result = add( a, b ); } else if(ch=='-') { result=sub(a,b); } else if(ch=='*') { result=mul(a,b); } else if(ch=='/') { result=divi(a,b); } else if(ch=='q') { exit(0); } cout<<"enter 1st number"; …

Member Avatar
Member Avatar
+0 forum 2

hi i'm new to php but i tried to make my own edu website but i'm facing lot of problem to fetch the result using php external site is about one of the Engineering university where 10k students result will be displayed by this website bcoz of this its server will be busy.so i tried to fetch the result from it. coming to reqirement when the students enter their usn no(eg:1db11cs001) when user hit submit button it must fetch result from external website(eg:http://results.vtu.ac.in/vitavi.php) and it must display result on my website so plz help me by giving complete code for …

Member Avatar
Member Avatar
-4 forum 19

I need to make one statement to select either of the items in listbox and show the same label, regardless of which item is selected. I've tried someting like If Me.ListBox1.SelectedItem = "R115" Or "Bay, Charles" Then Label1.Text = "Address Information Avaliable" End If But it doesn't work. The code below works but I need to make it shorter. If Me.ListBox1.SelectedItem = "R115" Or Me.ListBox1.SelectedItem = "Bay, Charles" Then Label1.Text = "Address Information Avaliable" End If Any suggestions?

Member Avatar
Member Avatar
+0 forum 2

Hi! Can anyone know the result of this query: SELECT COALESCE(MAX(ID),0) + 1 FROM Table123

Member Avatar
Member Avatar
+0 forum 3

Hello, so I was trying few relations between tables and I noted an unexpected behaviour when using `group_concat()`. Let say I have three tables: fruits, fruitstock and fruitprices. These are the structures: create table fruits ( id tinyint unsigned not null auto_increment primary key, name varchar(50) not null, quality varchar(50) not null ) engine = myisam default charset = utf8; create table fruitstock ( id tinyint unsigned auto_increment primary key not null, fruit_id tinyint unsigned not null, quantity tinyint unsigned not null default 0 ) engine = myisam default charset = utf8; create table fruitprices ( id tinyint unsigned not …

Member Avatar
Member Avatar
+1 forum 1

can someone help me to find out why my label display is listing the result of the textboxes instead of adding up the values of the text boxes? here are my codes: Dim strstudentName As String = (" ") Dim dblAssignment1 As Double Dim dblAssignment2 As Double Dim dblAssignment3 As Double Dim dblAssignment4 As Double Dim dblMidterm As Double Dim dblFinalExam As Double strstudentName = (txtStudentName.Text) dblAssignment1 = (txtAssignment1.Text) dblAssignment2 = (txtAssignment2.Text) dblAssignment3 = (txtAssignment3.Text) dblAssignment4 = (txtAssignment4.Text) dblMidterm = (txtMidterm.Text) dblFinalExam = (txtFinalExam.Text) lblFinal.Text = "Final Grade is: " + (txtAssignment1.Text + txtAssignment2.Text + txtAssignment3.Text + txtAssignment4.Text + txtMidterm.Text …

Member Avatar
Member Avatar
+0 forum 2

<?php $username = $_SESSION['username']; $result = 'sample'; $con = mysql_connect("localhost","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } $sql = "Select FirstName from Person Where LoginID = (Select LoginID from UserLogin Where Username = '$username')"; $result = mysql_query($sql,$con); echo $result; ?> I'm kinda new to this server-side scripting language (php) and I've been burning the midnight oil trying to figure out, how to get my single value result to display... perhaps any of you out there could help me solve this problem? I would appreciate all the help I can get.

Member Avatar
Member Avatar
+0 forum 7

//compute percentage for Parent1 DecimalFormat df = new DecimalFormat("#.##%"); rs = s.executeQuery("SELECT " + "(SELECT COUNT(*) FROM genetic.blood_type where diseases = '" + disease1 + "')" + "/COUNT(*) AS rowcount FROM genetic.blood_type where btype = '" + btype1 + "'"); rs.next(); int result = rs.getInt("rowcount"); rs.close(); out.println(disease1 + " is " + df.format(result) +" "+ result);

Member Avatar
Member Avatar
+0 forum 2

I am making a mysql query that gathers comments for a user, it works properly, I connect to the database and recieve the comments for a user, but it is not showing the first comment for the user. Here is the code function comments(){ //connect to db connect_db_members(); //start query global $number; $query = "SELECT * FROM comments WHERE commentie='$number' ORDER BY id DESC"; //run query $results = mysql_query($query); //check if there are no comments if(mysql_fetch_array($results) == ""){ echo '<div class="comments_about_wrapper"> <div class="comment_text_wrapper"> <div class="comment_text" ><p style="font-size:29px;">You have no comments</p> </div> </div> </div>'; } else {while($row = mysql_fetch_array($results)){ echo '<div …

Member Avatar
Member Avatar
+0 forum 4

I want to create an integer generating program where the user enters any number in TextBox1 and TextBox2 and presses the Generate button and in another textbox the integers shows up. REFER TO THE LINK to see what I mean. [Click Here](http://picturepush.com/public/11671143)

Member Avatar
Member Avatar
+0 forum 1

>Hi guys,..i've two arrray data1 and data2 then i do intersect to get same value between data1 and data2, and >use count to get total same value,..how to ARSORT count result from intersect array multidimensional? <?php $data1 = array( array( '7' => 'chelsea everton', '8' => 'everton villa', '9' => 'villa liverpool', '10' => 'liverpool manutd' ), array( '23' => 'milan inter ', '24' => 'inter juventus', '25' => 'juventus napoli', ), array( '53' => 'chelsea everton', '54' => 'barcelona altetico', '55' => 'altetico getafe', '56' => 'everton villa', ) ); $data2 = array( array( '3' => 'milan inter', '4' …

Member Avatar
Member Avatar
+0 forum 2

I have the following code to search the stores by name and and order by transaction date by Asc which works perfect. My questions is how to performe a subtraction by row (checkamount-redeposited-replacement-paidcash = balance) and totalize by columns (total checkamount, total redeposited, total replacement, total paidcash and total balance) by store name and by all stores using a drop down combo box. See an exemplo: Bounced checks report! From Main Office 2012-01-01 To 2012-09-20 Check ID Transaction Date Store Name Check Date Date Cashed Date Return Check Number Maker Name Payee Name Bank Name Check Amount Return Reason Date …

Member Avatar
Member Avatar
+0 forum 14

Hi every one!! I need help to match user data from database inorder to log in to admin panel. Here is what I am trying. it works ok but it is giving dialog box containing text "Sorry! You have no access to Database" here is the code. Please help String user = jTextField1.getText(); String pwd = new String(jPasswordField1.getPassword()); while (rs.next()) { String uname = rs.getString("User name"); //Username is the coloumn name in the database table String password = rs.getString("Password"); if ((user.equals(uname)) && (pwd.equals(password))) { admin_panel p = new admin_panel(); p.setVisible(true); } else if ((!user.equals(uname)) && (!pwd.equals(password))) { // System.out.println("Sorry! You …

Member Avatar
Member Avatar
+0 forum 5

i have writeen following query in my code. $tquery="SELECT questions.id,questions.date,questions.title,users.user_name,subjects.subject FROM questions INNER JOIN users ON questions.student_id=users.id INNER JOIN topics ON questions.topic_id=topics.id INNER JOIN subjects ON topics.subject_id=subjects.id WHERE subjects.id=".$_SESSION['sub1']." OR subjects.id=".$_SESSION['sub2'].";"; but when i am trying to echoing its result it is not displaying anything.

Member Avatar
Member Avatar
+0 forum 4

Hello, I want to combine all my database table in to one line so i can put it all in the url e.g. Name | Times __________________________ test1 | 1 __________________________ test2 | 2 __________________________ This is how i want it to look in the url (Result.php?loggedin=true&links=test1-1_newline_test2-2)(_newline_ means that will be a break point when the other page receives is links) NOTE: After the script retreves the data i'm using header('Location: page') to send the data to the result.php page.

Member Avatar
Member Avatar
+0 forum 2

HI. I've tried other codes, but they don't seem to work. What I'm trying to do, is grab a result from google's shopping page, and display it on my page. I only want the title, which is in the tag:[CODE]<h3 class="result-title">TITLE</h3>[/CODE] How do I do that in PHP? Thanks!

Member Avatar
Member Avatar
+0 forum 6

select name, REPLACE(format, ' – ', '/') as format, CAST(price AS UNSIGNED INTEGER) as price, CONCAT('http://www.example.com/',url_key) as url, id, delivery, sku from Database1 where delivery <> 'finished' INTO OUTFILE 'test.txt' FIELDS TERMINATED BY '\t'; this query returns empty result while select name, REPLACE(format, ' – ', '/') as format, CAST(price AS UNSIGNED INTEGER) as price, CONCAT('http://www.example.com/',url_key) as url, id, delivery, sku from Database1 where delivery <> 'finished'; returns with results, I am a new to databases and developement so need help.

Member Avatar
+0 forum 0

Hi All Im trying to get this to work, but can only get it to work without putting the form tags in, and wont work with more than one set of the inputs. the below is the result when i use ajax to search for item names, then want to caluculate the quantity * length (for total quantity), then total quantity * rrp_exc. the result should show in the the total field. It works, but not if the form tags are in and if there are multiple rows of the below inputs, eg, when there is more than one item …

Member Avatar
Member Avatar
+0 forum 3

Hi all, I am new to php and I have a problem that I am looking into it for 1 day and can't understand it please help. here is my html code : <html> <head> <title> Calculation Form </title> </head> <body> <form action=calculate.php method="POST"> value one: <input type="text" name"val1" size=10 /><br /> value two: <input type="text" name"val2" size=10 /><br /> <p>Calculation:<br> <input type="radio" name="calc" value="add"> add<br> <input type="radio" name="calc" value="subtract"> subtract<br> <input type="radio" name="calc" value="multiply"> multiply<br> <input type="radio" name="calc" value="devide"> devide</p> <p><input type="submit" name="submit" value="calculate"></p> </form> </body> </html> It calls the calculate.php it has 2 text boxes and 4 radio …

Member Avatar
Member Avatar
+0 forum 4

Hi Everyone, I have been trying to understand mysql a little further - with some small steps in the right direction. but I have come across a problem I am unable to fix / get working. I have a form, that has a variable $country - I am trying to get the sms text message price for the varible $country Below is my attempt - to get the sms price (table field name (price) from tbl (sms_prices)) (table field name (name) from tbl (sms_countries)) [code] $query = "select c.country_id, c.name, p.price from sms_countries c, sms_prices p where c.name = '$country' …

Member Avatar
Member Avatar
+0 forum 2

Hi, I have a table called BookTitle that holds book information. I have an SQL statement that lists all books that have the same value of a book called 'Northern Lights'. The code works but what I want to do is to exclude 'Northern Lights' from the result. This is the code I have: [CODE]SELECT bt2.btName FROM BookTitle bt1, BookTitle bt2 WHERE bt1.btName = 'Northern Lights' AND bt2.value = bt1.value ;[/CODE] Any help would be appreciated. Thanks

Member Avatar
Member Avatar
+0 forum 8

I'm stumped as to why this might be happening. A website I had completed for a client over a year ago, was working fine until a couple of days ago when the web host went and moved the site onto a new server without warning any of their customers (myself included). This caused errors with the database connections etc., but that was all easily fixed. Now something strange is happening though - one of my bigger INNER JOIN queries (which was working fine) is suddenly returning empty results. I had a quick search and found that this was happening for …

Member Avatar
Member Avatar
+0 forum 3

Hey guys. I've been searching and searching but none of the information I get makes any sense. I have a simple problem. On my checkout page, I allow my customers to select a charity to donate to. I can't however figure out how to get the information from which checkbox they selected. There are three checkboxes. Here is the code I am using. [CODE]<h2 id="checkoutConfirmDefaultHeadingComments"><?php echo HEADING_CHARITY_DONATION; ?></h2> <div class="buttonRow forward"><?php echo '<a href="' . zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL') . '">' . zen_image_button(BUTTON_IMAGE_EDIT_SMALL, BUTTON_EDIT_SMALL_ALT) . '</a>'; ?></div> <div><?php echo (empty($order->info['comments']) ? NO_COMMENTS_TEXT : nl2br(zen_output_string_protected($order->info['comments'])) . zen_draw_hidden_field('comments', $order->info['comments'])); ?></div> <br class="clearBoth" /> …

Member Avatar
Member Avatar
+0 forum 1

I want to build a program for my c language project.What i need to do is that the user should enter the number of students,number of questions,correct answers,each students answers answers and then the program should calculate the number of correct answers,and their standing,the most wronged question . the problem i am facing is that i dont know how to match each students answers with the correct answer.this has to be done with dynamic arrays. Help me in this: I am posting the code. [CODE]#include<stdio.h> #include<conio.h> #include<stdlib.h> int main (void) { int studnum,a,b; int quesnum; int *array1; int *array2; int …

Member Avatar
Member Avatar
+0 forum 7

; multi-segment executable file template. data segment string db "THis is LuxUR in Summer." ends stack segment dw 128 dup(0) ends code segment start: ; set segment registers: mov ax, data mov ds, ax mov es, ax mov bx, offset string mov al, 0 ; lower letters in word mov dl,0 ; maximum letters check: mov cl, 41h ; from A-Z mov ch, 5Ah mov ah, [bx] cmp ah, "." je dot cmp ah, " " je empty jne letters letters: cmp ah, cl je uppercase inc cl cmp cl, ch jne letters mov cl, 61h ; a-z mov ch, …

Member Avatar
Member Avatar
+0 forum 1

Hi Everyone- We are building a database that needs table(purchaser) to check table(paypal) for a matching telephone number. Table(paypal) has 'purchaser telephone' as PK and table(purchaser) has 'purchaser telephone' as FK. I can insert and see the data in both tables, but running a select query returns an empty result. The format for datasets in both tables is decimal(19,5) to allow for international numbers and a 5 digit extension. We are running innodb. We have also tried it with email addresses and got the same (they are varchar). The queries that return empty are below. [CODE] SELECT purchaser telephone FROM …

Member Avatar
Member Avatar
+0 forum 6

HELP!! I try to bind a textbox to a datatable but i cant.. I checked if the datatable is filled (it includes the results of a sql query)and it s ok.. i can depict the result in a combo box but not in textbox. I wait for only one result that s why i need textbox instead of combo.. that s my code.. i m desperate .. [CODE]Dim StateTable As New DataTable StateTable.Clear() ' Dim ds As New DataSet Dim sqlCmd As New SqlCommand("select DISTINCT State_LCL from T_MUNICIPALITY,T_MUNICIPALITY_STREETS where T_MUNICIPALITY.Municipality_LCL=T_MUNICIPALITY_STREETS.Municipality_LCL and T_MUNICIPALITY_STREETS.Municipality_LCL='" & txtMunicipality.Text & "'", conn) Dim StateDA As …

Member Avatar
Member Avatar
+0 forum 4

The End.