hi!
is it possible to do the aforementioned query - selecting only distinct
in 1 col but retrieving all other cols at the same time.
regards
marc 4 6141
heres the query im trying (well one variant):
$result = mysql_query("SE LECT name, id FROM tblproducts WHERE category
= '$category_get' & name = DISTINCT ORDER BY name ASC LIMIT 0,8");
also tried: "select distinct name, id.." to no avail...
monomaniac21 wrote:
hi!
is it possible to do the aforementioned query - selecting only distinct
in 1 col but retrieving all other cols at the same time.
regards
marc
monomaniac21 wrote:
heres the query im trying (well one variant):
$result = mysql_query("SE LECT name, id FROM tblproducts WHERE category
= '$category_get' & name = DISTINCT ORDER BY name ASC LIMIT 0,8");
also tried: "select distinct name, id.." to no avail...
monomaniac21 wrote:
hi!
is it possible to do the aforementioned query - selecting only distinct
in 1 col but retrieving all other cols at the same time.
regards
marc
what do you mean exactly?? you can do:
$result = mysql_query("SE LECT * FROM tblproducts WHERE category
= '$category_get' & name = DISTINCT ORDER BY name ASC LIMIT 0,8");
that will select all the fields from each row that matches your where
clause..
Flamer.
you cant do this query:
SELECT * FROM tblproducts WHERE name = DISTINCT ORDER BY date_added
DESC, name ASC LIMIT 0,8
mysql wont allow it. by distinct im referring to unique values not the
string value equal to distinct.
can anyone help me with a query that can do this?
flamer di******@hotmai l.com wrote:
monomaniac21 wrote:
heres the query im trying (well one variant):
$result = mysql_query("SE LECT name, id FROM tblproducts WHERE category
= '$category_get' & name = DISTINCT ORDER BY name ASC LIMIT 0,8");
also tried: "select distinct name, id.." to no avail...
monomaniac21 wrote:
hi!
>
is it possible to do the aforementioned query - selecting only distinct
in 1 col but retrieving all other cols at the same time.
>
regards
>
marc
what do you mean exactly?? you can do:
$result = mysql_query("SE LECT * FROM tblproducts WHERE category
= '$category_get' & name = DISTINCT ORDER BY name ASC LIMIT 0,8");
that will select all the fields from each row that matches your where
clause..
Flamer.
monomaniac21 wrote:
you cant do this query:
SELECT * FROM tblproducts WHERE name = DISTINCT ORDER BY date_added
DESC, name ASC LIMIT 0,8
mysql wont allow it. by distinct im referring to unique values not the
string value equal to distinct.
can anyone help me with a query that can do this?
flamer di******@hotmai l.com wrote:
>>monomaniac2 1 wrote:
>>>heres the query im trying (well one variant):
$result = mysql_query("SE LECT name, id FROM tblproducts WHERE category = '$category_get' & name = DISTINCT ORDER BY name ASC LIMIT 0,8");
also tried: "select distinct name, id.." to no avail...
monomaniac 21 wrote:
hi!
is it possible to do the aforementioned query - selecting only distinct in 1 col but retrieving all other cols at the same time.
regards
marc
what do you mean exactly?? you can do: $result = mysql_query("SE LECT * FROM tblproducts WHERE category = '$category_get' & name = DISTINCT ORDER BY name ASC LIMIT 0,8");
that will select all the fields from each row that matches your where clause..
Flamer.
Maybe you should ask MySQL questions in a group such as
comp.databases. mysql - where the MySQL gurus hang out?
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== === This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: don |
last post by:
Ref Dvd Title Location
----------------------------------------
62 Pilates; Austin Binder 1
63 Yoga; Kripalu Binder 1
64 Yoga; Workout Binder 1
93 The Sopranos Binder 1
94 The Sopranos Binder 2
95 The Sopranos Binder 3
|
by: Matik |
last post by:
Hello all,
I've following problem. Please forgive me not posting script, but I
think it won't help anyway.
I've a table, which is quite big (over 5 milions records). Now, this
table contains one field (varchar), which contains some data in
the chain.
Now, there is a view on this table, to present the data to user. The
|
by: monomaniac21 |
last post by:
Hi all
Can anyone tell me how you can query mysql for all unique entries into
a particular table collumn. Ive checked the manual but had no luck!
Kind regards
marc
|
by: monomaniac21 |
last post by:
Hi all
Using MySQL can anyone tell me how to most efficiently insert a collumn
in 'table1' retrieve the id from this record and insert mutliple
records into 'table2' with a collumn for the id in 'table1' which links
the two recordsets
|
by: msch-prv |
last post by:
Hi, I am trying to tie a SQLDataSource control to MySQL without
success. The connection string works ok with an ObjectDataSource.
(Native asp.net 2.0 MySQL dll loaded in /bin)
For some reason, the compiler believes an SQL db is being accessed ("An
error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact
that under the default settings SQL Server does...
| |
by: 1987dan |
last post by:
I have made a collumn 7 rows deep where i click an arrow at the top of the column and then a red counter appears in the bottom cell of the collumn.
I wish to make this collumn like a connect 4 collumn in the sense that every time i click the arrow and a red counter image replaces a white counter image. And these red Counters build on top of each other.
|
by: jej1216 |
last post by:
I am trying to put together a PHP search page in which the user can select none, one, two, or three fields to search, and then the results php will build the SQL with dynamic where caluses to reflect the fields chosen.
The first page, where they select the search fields and submit:
<?php
$db = mysql_connect("localhost", "root", "yeahright");
if (!$db)
{
die('Could not connect:'.mysql_error);
|
by: TechnoAtif |
last post by:
Hi to all.
I have got a form containing of checkboxes along with other items.
I have simply no clue as to
(i) how to make entry for those checkbox data into the mysql table . I mean : what query to put for creating field corresponding to checkboxes. Create table arc(status ---?)
status is the array for checkboxes. what should be the data type and its length.
(II)How to post data from the checkboxes correctly into the database on submit....
|
by: ctrap |
last post by:
Hi Everyone,
Here's my situation: I'm making a website for an employment agency, there is a page where potential employees can visit and "pre-register". When the submit button is hit the information is supposed to be stored in a MySQL database. Number one, when I hit submit nothing happens. I have to manually execute the PHP script. When the PHP script is executed it inserts a blank record into the database and I get my Thank You...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |