Jump to content

Recommended Posts

Hi all,

 

for some reason I cant see this blantantly obvious query.

 

I have 3 rows in my database, all with an id of 1, their is a column called price which contains three different float values, how the hell do I write a query in php for this?!

$q = mysql_query("SELECT price FROM mytable WHERE id=1")
????

Thanks!

First of all, you're not writing a query in PHP, you're writing it in SQL.  New programmers don't usually understand that they're using up to 5 languages at once.  PHP, SQL, JavaScript, HTML, and Regular Expressions are all stand-alone languages.

 

Secondly, bah, pikachu beat me.

 

-Dan

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.