On Mon, 19 Jul 2010 10:36:40 -0600
"Ashley M. Kirchner" wrote:
> mysql> select * from table where id='1';
> +---+-+-+---+
> | 1 | 123 | 0.0 | C |
> | 1 | 234 | 0.1 | D |
> | 1 | 345 | 0.0 | D |
> | 1 | 456 | 0.1 | C |
> | 1 | 567 | 0.1 | G |
> +---+-+-
On Mon, 16 Nov 2009 14:21:41 -0800, Allen McCabe wrote:
> I have an order table that keeps track of the order_id, the date, the
> status, etc. I also have an order_lineitem table that is the contents of the
> order. This has a one-to-many structure (without foreign keys because it is
> mysql).
Allen McCabe wrote:
> I have a page on my site where I can optionaly filter by certain fields
> (order by filesize or file category), but I am implementing a shopping
> cart type of idea where users can submit an order.
>
> As administrators, my coworkers and I need to be able to filter orders by
[snip]
can someone tell me how to do this:
i have to retrive data from a mysql table let's sayTABLE . i have to
check that the rows i retrive meet this condition:
field1='$variable',field2 is false and field3 is also false. as you
can see field2 and field3 are bool type. field1 is varchar. i di
> Change your query:
> selectdayofmonth(Posted) as DOM_Posted,
> month(Posted) as M_Posted,
> year(Posted)as Y_Posted,
> hour(Posted) as HH_Posted,
> minute(Posted) as MM_Posted,
> Name,
> Prayer
> from pray
tnx it worked just like i wanted it to...
- Original Message -
From: "Barajas, Arturo" <[EMAIL PROTECTED]>
To: "'Sunfire'" <[EMAIL PROTECTED]>
Sent: Tuesday, February 18, 2003 7:59 PM
Subject: RE: [PHP] mysql select and date functions
> Ha
Change your query:
select dayofmonth(Posted) as DOM_Posted,
month(Posted) as M_Posted,
year(Posted)as Y_Posted,
hour(Posted) as HH_Posted,
minute(Posted) as MM_Posted,
Name,
Prayer
from prayer
T
SELECT DISTINCT(gallery.design) FROM gallery
:
>
>I want to limit to 1 the same names returned from the query like:
[CUT]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Thanks a lot!
I'm just blind!
"Quentin Bennett" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
o.nz...
What's wrong with
select left(myfield, 500) from mytable;
?
Quentin
-Original Message-
From: Micah Bushouse [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 17 December 2002 3:
What's wrong with
select left(myfield, 500) from mytable;
?
Quentin
-Original Message-
From: Micah Bushouse [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 17 December 2002 3:22 p.m.
To: [EMAIL PROTECTED]
Subject: [PHP] MySQL select a field's first X bytes
Is there a way in MySQL to select
on 1/16/02 11:57 AM, Mike Krisher at [EMAIL PROTECTED] wrote:
> someone here has to know the syntax for using multiple items in a where
> definition, something like:
>
> $values = 120106,120095;
> $sql = "SELECT * FROM products WHERE catalognumber = $values ORDER BY
> price";
>
select * from p
if(!($result=mysql_db_query("SELECT username FROM users" $db)))
{
print "Error getting rows";
exit();
}
while($row=mysql_fetch_array($result))
{
$username=$row["username"];
print "$username";
}
mysql_free_result($res
Hello Tarrant,
Thursday, August 09, 2001, 1:14:25 PM, you wrote:
TC> When saying; mysql_query("SELECT username FROM users",$db); it only show's
TC> one of the first users in the column "users".
TC> Could someone please tell me how to make it print out the complete column
TC> list of usernames. I
> but no luck.
Take a look at one of the tutorials.. Many can be found on the links page
you can click to on www.php.net
This will help you to find the info you need and also answer the next
question you're going to ask.
Bye,
B.
--
PHP General Mailing List (http://www.php.net/)
To unsu
]
Sent: 23 May 2001 21:28
To: [EMAIL PROTECTED]
Subject: Re: [PHP] MySQL Select
why not just simply it more
while ($r = mysql_fetch_array($result))
{
// do your thing here
}
--
Chris Lee
[EMAIL PROTECTED]
"Jon Haworth" <[EMAIL PROTECTED]> wrote in message
67DF9B67CEFA
why not just simply it more
while ($r = mysql_fetch_array($result))
{
// do your thing here
}
--
Chris Lee
[EMAIL PROTECTED]
"Jon Haworth" <[EMAIL PROTECTED]> wrote in message
67DF9B67CEFAD4119E4200D0B720FA3F53FA57@BOOTROS">news:67DF9B67CEFAD4119E4200D0B720FA3F53FA57@BOOTROS...
> So
Hi
This is what I always do...
1. for one row (saved in array $reihe)...
$bla = "SELECT * FROM table WHERE id = '$something''';
// db is your database connection
$test = mysql_query($bla, $db);
// you dont have to use the if...i do that to check if anything
was returned
if ($r
On Mié 23 May 2001 16:32, you wrote:
> ok...sorry to ask a stupid question but
>
> $result = mysql_query("SELECT jazz FROM funk WHERE foo='bar'")
>
> but where do you go from there. How would you iterate through the array a
> row at a time, doing your thing as you go along?
Man, Read The F***
Something like:
if ($array_result = mysql_fetch_array($result)) {
do {
// do your thing here
} while ($array_result = mysql_fetch_array($result));
}
HTH
Jon
-Original Message-
From: Jamie Thompson [mailto:[EMAIL PROTECTED]]
Sent: 23 May 2001 14:33
To: [E
think this is what you want
$i = 0;
$result = mysql_query("SELECT jazz FROM funk WHERE foo='bar'")
while($music = mysql_fetch_array($result))
{
$funk_music[$i] = $music[0];
$I++;
}
ok...sorry to ask a stupid question but
$result = mysql_query("SELECT jazz FROM funk WHERE foo='
On Thu, 3 May 2001 20:15:26 +0100, James, Yz ([EMAIL PROTECTED])
wrote:
>Hi Guys,
>
>Does anyone know how to select one field randomnly from a MySQL
table
>against a weighting column in the same row the field is selected
>from?
>
>For example, "SELECT id, url, image FROM table ORDER BY rand() LIMI
On Wednesday 10 January 2001 20:58, [EMAIL PROTECTED] wrote:
> I have PHP perform SELECT queries on the table, and I need to display
> the results in a format of: "viewing $top to ($top+$depth) of $numrows
> found"
>
> I haven't found a way to determine $numrows without performing a second
> SELE
You don't need to select all the data to get the number of rows. Try
this:
select count(*) as total from products where $product_query;
Then use total instead of num_rows.
Be sure the elements in your where clause are properly indexed.
[EMAIL PROTECTED] wrote:
>
> Could someone suggest some op
You can use KEY() which will add extra keys to the table.
--Joe
On Wed, Jan 10, 2001 at 12:58:37PM -0700, [EMAIL PROTECTED] wrote:
> Could someone suggest some options here for performance improvement?
>
> I have a table with about 300,000 entries/records by 7 columns/fields. All of
> the inf
24 matches
Mail list logo