97 Topics

Member Avatar for
Member Avatar for borobhaisab

Hiya, I know it is possible to auto generate prepared statements based on table column names and numbers. But how to achieve it ? I have many tables and I want to allow visitors to be able to search these tables. Now, if I have 20 different tables, I do …

Member Avatar for borobhaisab
0
126
Member Avatar for borobhaisab

Hi, I got this long version code: ```` if(ISSET($_GET['limit'])) { $limit = intval($_GET['limit']); } else { $limit = intval(1); } ```` I can shorten it, like this and it works: ```` $limit = ISSET($_GET['limit'])?intval($_GET['limit']):1; ```` Now add an echo and try shortening it. And I get error. I got this …

Member Avatar for Dani
0
32
Member Avatar for Siberian

Can a else if, or else statment contain a condition ? If the condition is not meet then, nothing happens other wise one of the else if or if statements is read ?

Member Avatar for Siberian
0
524
Member Avatar for westsiderailway

Hello Everyone, it seems that I cannot see the wood for the trees.... :-) I am having problems with this line of code... StateSQL = "select * from petrol_table where fueldate >= " & "'" & M12S & "'" & " and fueldate < " & "'" & M12F & …

Member Avatar for westsiderailway
0
312
Member Avatar for diafol

I've been playing with PDO and got quite a shock, so I thought I'd run this past you all. I love PDO, and I thought that the "prepare once, execute many" idea behind prepared statements was beautiful. Now previous to using prepared statements, I used to build up a long …

Member Avatar for diafol
4
12K
Member Avatar for zizo.ahmed.779

hello everybody...nice to back again i m working on project to calculate measures and numbers and insert data inside datagridview(dgv) from number.text and measure.text but if value of measure.text present in dgv son update number cell with new value + present value problem is how to do so.... i tried …

Member Avatar for zizo.ahmed.779
0
3K
Member Avatar for slyme

Hello, I am getting a bit confused regarding apostrophes in my SQL statement. I can get it to work but I would like to understand why it works when it does or, conversely, why it doesn't work when it doesn't. If you know what I mean. Anyway - here goes: …

Member Avatar for pritaeas
0
268
Member Avatar for OtepTheThird

Im new to PHP, i just want to know if theres any rule in php in terms of single statement multiple lines. for example in VB.Net we uses "&_"(w/o the quote) to tell vb.net that it is a single statment and it has a continuation. is there any in php? …

Member Avatar for matrixdevuk
0
428
Member Avatar for Ryan_11

I have three tables i want to search for customer data depending on the equipment type. $test = "SELECT custid, equipment FROM customer WHERE custid='$id'"; $data = @mysqli_query ($dbcon, $test); $equip = mysqli_fetch_array($data, MYSQLI_ASSOC); if($equip['equipment'] = "cellphone" ){ // Make the query: $q = "SELECT custid, cdate, custName, customer.equipment, customer.manufacturer, …

Member Avatar for Topnews
0
274
Member Avatar for Ryan_11

I have a table that logs customer data but i want to search for the customer, upon finding that customer i want to click on the name and find it in another table that store other data. But here is where i am stuck i want to check which table …

Member Avatar for tapananand
0
200
Member Avatar for Himanshu Chawla

I am preparing for my exams and i just found this question from previous question papers: Give the C Expression for the following algebric expression : 1. ab^4c^2-d/m-n 2. ab-[{(e+f)^9}/c}] Please help me as i am preparing for my exams and haven't read this topic yet. help plz

Member Avatar for iamthwee
0
237
Member Avatar for Pyler
Member Avatar for mpike

Alright I apologize for the completely uninformative title but i had no idea what to call it. Basically I have an array with multiple values and I only want information to be sent from certain forms if a certain value is met in the array. <?php if(isset($_POST['cb1'])) { $cb1 = …

Member Avatar for world_weapon
0
368
Member Avatar for moaz.amin.37

write a c++ class run that contains followin data member 1)name of runner. 2)distance covered by runner. class ha following member function 1)get function for input runner name and distance. 2)show function to display runner name and distance. the user should be able to show the name of the runner …

Member Avatar for Kristian_2
0
845
Member Avatar for ray100

Hi,I am a beginner in php. And I am trying to create this php program where a user selects a picture and it displays it! Theare is an input page which is html and an processing page which is php! I seemes to have a problem in the processing page …

Member Avatar for GliderPilot
0
236
Member Avatar for davidjennings

Hi all, I have to update some classic ASP code and I need to add an if statment to compare if a uppercase value is == "N/A" and to compare value with request("productLink") line 8 and if it is it should by pass validation on line 16. Any further information …

Member Avatar for JorgeM
0
379
Member Avatar for Start4me

I want to make and If statement which will work when a double "credits" is between 1 and 9. But I'm not sure how to. Will If (1 <= credits => 9) Then Work?

Member Avatar for JamesCherrill
0
309
Member Avatar for kahaj

I only have experience using pretty basic Oracle. However, I'm now in need of a better understanding of SQL. I'm trying to write a query using CASE statements (as this seems to be the best approach), but am admittedly lost at the moment. Here is what I have as a …

Member Avatar for ugi.nagesh
0
334
Member Avatar for nikolaos

One thread increases an integer named "counter" , and another decreases the same integer. Using synchronized statement on LockObject to control access to counter. If i understand correctly i have to use an Object reference. Can i use synchronized statement on counter somehow? public class Synchronized_Block_Demo { public static int …

Member Avatar for nikolaos
0
341
Member Avatar for murali2489

Hi All, I have a Jtable with six columns. I am displaying the contents of my database into my Jtable. Its working fine. But I am facing trouble updating the changes done in Jtable cells to appropriate database cell. In the below code when I tried to edit the First …

Member Avatar for murali2489
0
357
Member Avatar for Kareem Klas

Hi everyone I'm studying the part about while-statement but I don't understand the explanation in the book really well and the example doesn't work for me so I can't see it with my own eyes how it works. Can someone explain what the while-statement means and does? Also can you …

Member Avatar for Kareem Klas
0
330
Member Avatar for SoulofchaOs

There's a error when I run this jsp file --> **" pstmt.executeUpdate();".** **"org.apache.jasper.JasperException: An exception occurred processing JSP page /TestAdd.jsp at line 39"** My code essentially have a text box for users to enter a value, and then the value is sent to the MySQL database. Any help is appreciated …

Member Avatar for peter_budo
0
300
Member Avatar for masterfact18

!! i was trying to create a simple grading system but my project doesnt work it always shows the last if statement and ignore the other statement...please help here's my code...can someone please tell me what's wrong coz i dont know how to use if/elseif/else statement... newbie here...please help Private …

Member Avatar for tinstaafl
0
285
Member Avatar for javauser1512

import java.io.*; import java.util.*; class Q9 { public static void main(String args[]) { int a,b,c; System.out.println("\n\t Enter the value of A,B & C "); Scanner sc = new Scanner(System.in); a = sc.nextInt();b = sc.nextInt(); c = sc.nextInt(); System.out.println("\nLargest = "+func(a,b,c)); } public static int func(int a,int b,int c) { if((a>=b)&&(a>=c)) …

Member Avatar for Starstreak
0
306
Member Avatar for yvrej17

I just wanna ask what's wrong with my code it says syntax error on INSERT STATEMENT but I can't find the error @.@ Try Using conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & System.Environment.CurrentDirectory & "\employeedb.mdb;") conn.Open() Dim command As New OleDbCommand("INSERT INTO employees (first_name, last_name, MI, address, age, contact, status, department, …

Member Avatar for yvrej17
0
374
Member Avatar for nunuaziz_

Im doing a reservation site for a project. And Im trying to disable radio button(s) if the sql statement returns true. Example: User selects a date and a time, and radio button(s) would be disable depending on database. So far, I have this: $result=mysqli_query($mysqli,"SELECT tableselect FROM reserve WHERE reserveDate = …

Member Avatar for broj1
0
1K
Member Avatar for boiishuvo

This code works fine but it would be too long if the score is 50 or over. Is there any way to make it shorter and quicker? I tried to use for loop statement but it didn't work well. background(backgroundChange); if (score >= 5 && score < 10) backgroundChange-=0.8; else …

Member Avatar for JamesCherrill
0
187
Member Avatar for Aditya_4

class Emp { int name, emp_no, addrs, ph_no, deprtmnt, post, project; Emp(int a, int b, int c, int d, int e, int f, int g) { name=a; emp_no=b; addrs=c; ph_no=d; deprtmnt=e; post=f; project=g; } Emp(int a, int b, int c, int d) { name=a; emp_no=b; addrs=c; ph_no=d; } Emp(int a, …

Member Avatar for Aditya_4
0
203
Member Avatar for whitelion

# how to validate sql statement 1. hi, is there anyone who can help me in my problem? sql = "SELECT UserID, Status FROM tbl_User WHERE UserID = '" & strUserID & "' and Password = '" & strUserPW & "' " i want to validate my sql statement using …

Member Avatar for whitelion
0
223
Member Avatar for Eyeteeorg

As someone who is new to Javascript, I find it kind of odd that Javascript doesn't seem to have a != operator. Is there a rationale why the language was designed this way?

Member Avatar for Eyeteeorg
0
192

The End.