English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

how can i word a query that selects * from a table.where the id=1 and assigns values in php for the other parameters.
this is my query, in which i know its wrong but to help you know what i mean.
===============
SELECT * FROM polls WHERE 'id'=1 AND 'question'= $question,
'answer1'= $answer1,'answer2'= $answer2,'answer3'= $answer3,
'answer4'= $answer4

2007-07-22 20:44:55 · 3 answers · asked by truepal20032001 2 in Computers & Internet Programming & Design

i don't want to modify, I want to retrieve data from the server.

2007-07-22 20:59:01 · update #1

3 answers

Something is wrong with your SQL command.

It should be:
SELECT * FROM polls WHERE id=1 AND question= $question, ......

There shouldn't be apostrophes on the field name.

2007-07-22 21:01:14 · answer #1 · answered by marsulein 6 · 0 0

The gist of the communicate obtainable (sorry, there are too many pages to grant all of the links) is that wands help to concentration the magic resident interior the witch or wizard, yet wandless magic continues to be attainable, extremely for extremely proficient human beings like Snape and Dumbledore. some examples ... Apparition Assuming one's Animagus form (or Metamorphpagus) Accio (the Summoning attraction) Elves can do magic devoid of making use of wands Lumos

2016-11-10 03:53:44 · answer #2 · answered by ? 4 · 0 0

don't use the "Select" command. It is only when you want to retrieve the values from database. Try learning how to use "modify" command. This is an example

UPDATE addressbook SET phone=1234567890 WHERE name = 'Someone'

addressbook will be your database table name, phone is the field you want to set the value, and WHERE name='someone' is where you want to define id=1

Hope this helps.

2007-07-22 20:54:06 · answer #3 · answered by Lain Lain 3 · 0 0

fedest.com, questions and answers