Jump to content

jjdave

Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jjdave's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Once Again, Thank You. It worked out great. Been at it for 3 Days, on and off...
  2. Thank you so much, I am trying out the code. Thanks again.
  3. Hi All, I am reading  Data into Array (id, part_no, part_desc, part_region etc.) [code=php:0] Example of Data: (Not PHP Code) ID  | Part_no  |  Part_Desc  |  Region 1  |  001    |  Valve      |  CA 2  |  121    |  Union Nut  |  WA 3  |  072    |  Fitting    |  VA 1  |  352    |  O-ring      |  AZ [/code] I am running while loop so it reads the Array; Now, I like to print this data with one condition; If ID 1 is printed then next time it needs to skip if the same ID is repeated. So in example above, it should print only ID 1, 2, 3 and stop printing. Any help will be appriciated. Thanks.
  4. Hi All, any help will be appriciated. Thanks. I am trying to JOIN 3 Tables (X & Y & Z) with 1 Column (partlist_id) and my query does not work. I can not print the results. [code=php:0]$query="SELECT x.id, x.assy_part,   y.part_no, y.part_desc,    z.roll_id,  z.roll_image   FROM `$table_name` as x    INNER JOIN `$vpt_table_partlist` as y ON y.partlist_id = x.partlist_id   INNER JOIN `$vpt_table_rollover` as z ON z.partlist_id = x.partlist_id"; $result=mysql_query($query); $num=mysql_numrows($result); echo "<TD><br>"; $i=0; while ($i < $num) {   $id=mysql_result($result,$i,"id");   $part_no=mysql_result($result,$i,"part_no");       echo "$id : $part_no";   $i++; } echo "</TD></TR>";[/code] If I remove Table Z and only JOIN Table X & Y, with following code, then it works fine. [code=php:0]$query="SELECT x.id, x.assy_part, y.part_no, y.part_desc   FROM `$table_name` as x    INNER JOIN `$vpt_table_partlist` as y ON y.partlist_id = x.partlist_id"; $result=mysql_query($query); $num=mysql_numrows($result); echo "<TD><br>"; $i=0; while ($i < $num) {   $id=mysql_result($result,$i,"id");   $part_no=mysql_result($result,$i,"part_no");       echo "$id : $part_no";   $i++; } echo "</TD></TR>";[/code]
  5. Hi All, I have a variable which contains name of a Database Table: How can I pass this variable into the Query to access a data from the table, following are my code. I want to know whats wrong. I hope I am clear enough. I am using mySQL with PHP. $table_name = $_GET['table_name']; $query="SELECT * FROM `$table_name` ORDER BY id"; $result=mysql_query($query); $num=mysql_numrows($result); Thanks.
  6. Hi all, I am quiet good with Dreamweaver and with PHP. How do you guys configure PHP with Dreamweaver so you can check you sentence structure and all as well as Bind database in the dreamwever while you are using PHP??? At the moment I use PHP & MySql, so some times I do use dreamweaver to write codes. I just saw few posts about Dreamweaver with PHP, so I like to get more information about it. Thanks...
×
×
  • 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.