Jump to content

majhate

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

majhate's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I am trying to use two 'where's in this query. I do not know if I am doing it right, nor if it is even possible. SELECT * from user where l_name = '$l_name' && age < '17' Thanks, Jason
  2. Hello, I am trying to use two 'where's in this query. I do not know if I am doing it right, nor if it is even possible. SELECT * from user where l_name = '$l_name' && age < '17' Thanks, Jason
  3. This is what I have tried: $query = "SELECT choice_count FROM colors WHERE ID='$ID'"; $result = mysql_query($query); while($rows = mysql_fetch_array($result, MYSQL_NUM)) { $value = $rows[0]; echo $new . "<br />\n"; } This will only display the values with a line break, I don't know how to add them up. I am not even sure if this would be the right way to do it.
  4. Hello, Lets say I have a table with the fields: ID, Color, Value So.. ID - Color - Value 1 - Blue - 3 2 - Orange - 1 3 - Black - 4 4 - Red - 2 How would I get the total of the values in one varible. so $total would = 10 I've been trying loops, but I cannot get this to work. Any sugguestions? Thanks!
  5. Hello, Lets say I have a table with the fields: ID, Color, Value So.. ID - Color - Value 1 - Blue - 3 2 - Orange - 1 3 - Black - 4 4 - Red - 2 How would I get the total of the values in one varible. so $total would = 10 I've been trying loops, but I cannot get this to work. Any sugguestions? Thanks!
  6. You guys are not answering my question! I need to know how to insert multiple varibles under one field in MySQL. Since the number of answers are going to vary, (could be 5 or 50) I need to use some kind of loop that puts them in 1 string (answers = $answer1 . "," . $answer2 . "," . $answer3) If it were a set number of answers I could do it, but its not. I have it so you can type the number of answers you want. Here: http://fileamp.com/test Now I need to be able to take the value of those text boxes and put it into 1 simple string. Any ideas? Thanks! Jason
  7. I need to know how to make it automatically put all of the varibles in a string. Like a for loop, because the amount of varibles is going to be undefined. The person may what 5, or 50 answers. Any ideas?
  8. Hello, I am new to the forum and php. I have a question many of you might find easy. I am trying to create a system where users can create their owns polls. I have it so they can type the number of answers they want with a for loop. I figured out the best to put the answers into a database is by using one field instead of many. So I would have a field called answers, and all the answers they wanted would go in there seperated by a space or something. Now my problem is, when then are going to fill in the answers (remember they typed in the number of answers and that exact number of textboxes showed up) I need to put all of their answers in a string, so: $string = $answer1 . "," . $answer2 . "," . $answer3. then this will go into the one answer field into the database. Now their number of answers would always vary so I'm guessing I would need to set it up in some kind of array that counts the number of varibles? I am stuck at this point. Any Ideas? I would greatly appreciate it! Thanks, Jason
  9. Does anyone know where I can get a script for when you enter a zip code in a shopping cart and it caculates the shipping costs? -Thanks
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.