Advertisement

09.02.2004 at 06:02AM PDT, ID: 21116670
[x]
Attachment Details

column name restriction

Asked by yotsse in PHP and Databases

Tags: name, column, restrictions

Hi,

I've my SELECT function which select all the columns of my table :

$ref = "SELECT *
            FROM reference
            WHERE produit_id='$produit_id'

I then call a php function in order to get all the name of the columns :

$row = mysql_fetch_array($result_ref, MYSQL_ASSOC);
foreach ($row as $fieldname => $fieldvalue){
                if ($fieldvalue != '' && $fieldvalue != $produit_id){
                          echo $fieldname";
                }
      }

The thing is that I don't want to get all the names of the colums of my table... I don't also want to call all the columns in my SELECT query (SELECT col1, col2...). So is there a trick with php to do that ???

Thanks in advanceStart Free Trial
[+][-]09.02.2004 at 07:13AM PDT, ID: 11963658

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.02.2004 at 07:55AM PDT, ID: 11964115

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.02.2004 at 07:59AM PDT, ID: 11964194

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.02.2004 at 12:53PM PDT, ID: 11967546

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.02.2004 at 01:16PM PDT, ID: 11967806

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.02.2004 at 11:15PM PDT, ID: 11970508

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.06.2004 at 11:00AM PDT, ID: 11991184

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: PHP and Databases
Tags: name, column, restrictions
Sign Up Now!
Solution Provided By: dewed
Participating Experts: 4
Solution Grade: A
 
 
[+][-]11.12.2004 at 08:05AM PST, ID: 12567090

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]11.19.2004 at 03:39AM PST, ID: 12624150

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]11.23.2004 at 03:31AM PST, ID: 12653533

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 7-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32