PHP & MySQL




Hi,

If I have a select statement where I select multiple columns from a
table and I'm only returning 1 row, there is no need for me to loop.

Is there any way for me to return these values into variables without
the loop? such as:

$select = "SELECT c1, c2, c3 FROM table_name WHERE x=1;

$c1, $c2, $c3 = mysql_query($select);

I do not need a loop. I can use an array, but can I get all three
values with one query statement?

john
.



Relevant Pages

  • Nested with loops
    ... nested loop - I'm out of thoughts in trying to troubleshoot it. ... correct some formulas that occur in multiple columns and rows. ... Loop While Not c Is Nothing And c.Address firstaddress ...
    (microsoft.public.excel.programming)
  • Re: Dos and donts
    ... John used 50k and an LT1124 opamp in his post, ... I would want to run in PSpice so I can use my "world-renowned" loop ... possible VHF oscillations in the transistors themselves, ... came out of chip processing working just ducky. ...
    (sci.electronics.design)
  • Re: For Loop Question
    ... I do understand that I will still occasionally encounter multiple "John ... Smith" occurances. ... I'm reading in a text file to a for loop to process against ... It ends up searching for John not "John Smith" and ...
    (comp.unix.questions)
  • Re: Need help with Loop that is not repeating the function
    ... lat/lon gecodes that I want to feed back into my table. ... because I thought the loop would take care of that. ... "John W. Vinson" wrote: ...
    (microsoft.public.access.formscoding)
  • Re: Sydney-X1 FPGA Computer Challenges Commodore, Amiga and Apple
    ... John S. Dyson wrote in message ... the simple empty loop takes about .75 nanoseconds per iteration. ... > for NORMAL instruction streams, where the data/program is cache resident, ... > that 1 instruction per clock cycle is plausible. ...
    (sci.electronics.design)