By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,530 Members | 2,181 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,530 IT Pros & Developers. It's quick & easy.

multiple querries

P: 9
I need to make multiple queries and the second and third rely on data retrieved from the first one. The 1st one finds a user in a table. If the user is there then we go on. However if they are not there all my other queries are failing because information is missing. I need to gracefully stop the sequential queries if the are not in the db. I am working internally and cant give a link but my code is below.

Thanks in advance.

Expand|Select|Wrap|Line Numbers
  1. //get the zip code from the form
  2.  
  3.      $zipcode = ($_POST['zip']);
  4.     echo "<br>Here are the results for zip code: <div class=seek>$zipcode</div><br> ";
  5.     echo "<br><font color=#0072bc size= 3><b><u>Publisher Information</u></b></font><br><br>";
  6. //select the db to use    
  7.     $dbname = 'adnet';
  8.     mysql_select_db($dbname);
  9.     $query_publisher = "SELECT p.`pdata_id_publisher`, p.`pdata_zipcodes` FROM publisher_data p where `pdata_zipcodes` LIKE '%$zipcode%';";
  10.  
  11. //echo"$query_publisher <br>";
  12.     $result=mysql_query($query_publisher) or die ( "Couldn't execute query" );
  13.     $num=mysql_numrows($result);
  14.  
  15.     if($num == 0 ){
  16.   echo"</p><p>There are no Publishers using that zip code.</p>" ;
  17.  
  18.     else
  19. }
  20. //THIS IS WHERE I AM HAVING PROBLEMS
  21.  
  22.     $i=0;
  23.     while ($i < $num) {
  24.  
  25.     $Publisher_id=mysql_result($result,$i,"pdata_id_publisher");
  26.     $Owned_Zip=mysql_result($result,$i,"pdata_zipcodes");
  27.  
  28. //echo "<b>Publisher ID:</b>$Publisher_id<br><b>Zip Codes:</b>$Owned_Zip<br><br>";
  29.  
  30.     $i++;
  31.     }
  32.  
  33. // Get the publishers details 
  34.     $dbname = 'adnet';
  35.     mysql_select_db($dbname);
  36.     $query_publisher_details = "SELECT d.`jobno`, d.`contact`, d.`phone` FROM db_publishers d
  37.     WHERE d.`id_publisher` = '$Publisher_id'";
  38.  
  39. //echo"$query_publisher_details <br>";
  40.     $result=mysql_query($query_publisher_details) or die ( "Couldn't execute query" );
  41.     $num=mysql_numrows($result);
  42.  
  43.     $i=0;
  44.     while ($i < $num) {
  45.  
  46.     $name=mysql_result($result,$i,"contact");
  47.     $phone=mysql_result($result,$i,"phone");
  48.     $jobno=mysql_result($result,$i,"jobno");
  49.  
  50. echo "&nbsp;&nbsp;<b>Publisher:</b>$name<br>&nbsp;&nbsp;<b>Phone:</b>$phone<br>&nbsp;&nbsp;<b>Job No.</b>$jobno<br>";
  51.  
  52.     $i++;
  53.     }
  54.  
  55. // Get the Publication details 
  56.     $dbname = 'adnet2009';
  57.     mysql_select_db($dbname);
  58.  
  59.     $query_publication = "SELECT d.community,d.code FROM db_publication_report d WHERE d.`zip` ='$zipcode' AND d.`id_publisher` = '$Publisher_id' and d.deleted is not null";
  60.  
  61. //echo"$query_publication <br>";
  62.     $result=mysql_query($query_publication) or die ( "Couldn't execute query" );
  63.     $num=mysql_numrows($result);
  64.  
  65.     $i=0;
  66.     while ($i < $num) {
  67.  
  68.     $community=mysql_result($result,$i,"community");
  69.     $code=mysql_result($result,$i,"code");
  70.  
  71.     echo "&nbsp;&nbsp;<b>Community:</b>$community<br>&nbsp;&nbsp;<b>Published Editions:</b>$code<br><br>";
  72.  
  73.     $i++;
  74.     }
  75.  
  76.  
  77.  
Feb 10 '09 #1
Share this Question
Share on Google+
17 Replies


Atli
Expert 5K+
P: 5,058
Hi.

To do that, you would check that there actually is any data available before you try to use it in the second query, using the the if construct.

For example:
Expand|Select|Wrap|Line Numbers
  1. // Assuming there is already an open MySQL connection.
  2.  
  3. $sql = "SELECT UserID FROM User WHERE something='keyword'";
  4. $result = mysql_query($sql) or die(mysql_error());
  5.  
  6. // Check if there were any results
  7. if(mysql_num_rows($result) > 0) {
  8.   $row = mysql_fetch_assoc($result);
  9.   $userID = $row['USerID'];
  10.  
  11.   $sql2 = "SELECT SomeStuff FROM SomeTable WHERE UserID = $userID";
  12.   $result2  = mysql_query($sql2) or die(mysql_error());
  13.  
  14.   while($row = mysql_fetch_assoc($result2)) {
  15.     echo $row['SomeStuff'] . PHP_EOL;
  16.   }
  17. }
  18. else {
  19.   // Print an error if no user is found.
  20.   echo "No user was found";
  21. }
Feb 11 '09 #2

P: 9
I took your advice but it seems to be erroring out when it tries to print out the fields just before the "no record found out put"

the error just says parse error no details.

Expand|Select|Wrap|Line Numbers
  1. //select the db to use
  2.  
  3. $dbname = 'adnet';
  4. mysql_select_db($dbname);
  5. $query_publisher = "SELECT p.`pdata_id_publisher`, p.`pdata_zipcodes` FROM publisher_data p where `pdata_zipcodes` LIKE '%$zipcode%';";
  6.  
  7. //echo"$query_publisher <br>";
  8. $result = mysql_query($query_publisher) or die("Couldn't execute query");
  9. $row = mysql_fetch_assoc($result);
  10.  
  11.  
  12.    $Publisher_id =  $row['pdata_id_publisher'];
  13.    $Owned_Zip =  $row['pdata_zipcodes'];
  14.  
  15.  
  16. //    echo "<b>Publisher ID:</b>$Publisher_id<br><b>Zip Codes:</b>$Owned_Zip<br><br>";
  17.  
  18.  
  19.  
  20. // Get the publishers details
  21. $dbname = 'adnet';
  22. mysql_select_db($dbname);
  23.  
  24.    $sql2 = "SELECT d.`jobno`, d.`contact`, d.`phone` FROM db_publishers d    WHERE d.`id_publisher` = '$Publisher_id'";
  25.    $result2  = mysql_query($sql2) or die(mysql_error());
  26.  
  27.    while($row = mysql_fetch_assoc($result2)) {
  28.      echo $row['contact'] . PHP_EOL;
  29.    }
  30.  }
  31.  else {
  32.    // Print an error if no user is found.
  33.    echo "No user was found";
  34.  }
  35.  
  36.  
  37.  
Feb 11 '09 #3

Atli
Expert 5K+
P: 5,058
It must give you some details, like the line number and file name?
What exactly does it say?

The problem, however, seems to be that you only have the else clause there. I can't see the if clause it goes with. Did you accidentally delete it or something?
Feb 11 '09 #4

P: 9
here is exactly what I have written and the error message is:

Parse error: parse error in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\Copy [2] of ron.php on line 45


thank you again....

Expand|Select|Wrap|Line Numbers
  1. <?php 
  2.  
  3. //update to reflect LIVE server
  4. require_once('incs/conn.php'); ?>
  5. </head>
  6.  
  7. <body>
  8. <?php
  9.  
  10.  
  11. //get the zip code from the form
  12.  
  13. $zipcode = ($_POST['zip']);
  14. echo "<br>Here are the results for zip code: <div class=seek>$zipcode</div><br> ";
  15. echo "<br><font color=#0072bc size= 3><b><u>Publisher Information</u></b></font><br><br>";
  16. //select the db to use
  17.  
  18. $dbname = 'adnet';
  19. mysql_select_db($dbname);
  20. $query_publisher = "SELECT p.`pdata_id_publisher`, p.`pdata_zipcodes` FROM publisher_data p where `pdata_zipcodes` LIKE '%$zipcode%';";
  21.  
  22. //echo"$query_publisher <br>";
  23. $result = mysql_query($query_publisher) or die("Couldn't execute query");
  24. $row = mysql_fetch_assoc($result);
  25.  
  26.  
  27.    $Publisher_id =  $row['pdata_id_publisher'];
  28.    $Owned_Zip =  $row['pdata_zipcodes'];
  29.  
  30.  
  31. //    echo "<b>Publisher ID:</b>$Publisher_id<br><b>Zip Codes:</b>$Owned_Zip<br><br>";
  32.  
  33.  
  34.  
  35. // Get the publishers details
  36. $dbname = 'adnet';
  37. mysql_select_db($dbname);
  38.  
  39.    $sql2 = "SELECT d.`jobno`, d.`contact`, d.`phone` FROM db_publishers d    WHERE d.`id_publisher` = '$Publisher_id'";
  40.    $result2  = mysql_query($sql2) or die(mysql_error());
  41.  
  42.    while($row = mysql_fetch_assoc($result2)) {
  43.      echo $row['phone'] . PHP_EOL;
  44.    }
  45.  }
  46.  else {
  47.    // Print an error if no user is found.
  48.    echo "No user was found";
  49.  }
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56. /*
  57. $query_publisher_details =
  58.     "SELECT d.`jobno`, d.`contact`, d.`phone` FROM db_publishers d
  59.     WHERE d.`id_publisher` = '$Publisher_id'";
  60.  
  61. //echo"$query_publisher_details <br>";
  62. $result = mysql_query($query_publisher_details) or die("Couldn't execute query");
  63. $num = mysql_numrows($result);
  64.  
  65. $i = 0;
  66. while ($i < $num) {
  67.  
  68.     $name = mysql_result($result, $i, "contact");
  69.     $phone = mysql_result($result, $i, "phone");
  70.     $jobno = mysql_result($result, $i, "jobno");
  71.  
  72.     echo "&nbsp;&nbsp;<b>Publisher:</b>$name<br>&nbsp;&nbsp;<b>Phone:</b>$phone<br>&nbsp;&nbsp;<b>Job No.</b>$jobno<br><br>";
  73.  
  74.     $i++;
  75. }
  76.  
  77. // Get the Calendars details
  78. $dbname = 'adnet2009';
  79. mysql_select_db($dbname);
  80.  
  81. $query_publication =
  82.     "SELECT d.community,d.code FROM db_publication_report d WHERE d.`zip` LIKE '%$zipcode%' AND d.`id_publisher` = '$Publisher_id' and d.deleted is not null";
  83.  
  84. //echo"$query_publication <br>";
  85. $result = mysql_query($query_publication) or die("Couldn't execute query");
  86. $num = mysql_numrows($result);
  87.  
  88. $i = 0;
  89. while ($i < $num) {
  90.  
  91.     $community = mysql_result($result, $i, "community");
  92.     $code = mysql_result($result, $i, "code");
  93.  
  94.     echo "&nbsp;&nbsp;<b>Community:</b>$community<br>&nbsp;&nbsp;<b>Published Editions:</b>$code<br><br>";
  95.  
  96.     $i++;
  97. }
  98.  
  99. */
  100. ?>
  101. <div class="search"><br><strong>Search Again</strong>
  102. <form name="form1" method="post" action="ron.php">
  103.   <label>
  104.   <input name="zip" type="text" id="zip" maxlength="5">
  105.   </label>
  106.   <label>
  107.   <input type="submit" name="button" id="button" value="Submit">
  108.   </label>
  109. </form></div>
  110.  
  111. </body>
  112. </html>
  113.  
Feb 11 '09 #5

P: 88
You have a } else { but no if previous so the "}" on line 45 is unexpected.
Feb 11 '09 #6

Atli
Expert 5K+
P: 5,058
Yea, hoopy is right.

It should be: if(something) { ... } else { ... }
Not just: } else { ... }

Check out my previous example again. That's how it should look.
Feb 11 '09 #7

P: 9
thanks that worked..

I broke it by adding a 3RD Querry though.

I wasnt sure about the WHILE part??

do you possibly have a chance to take a second look?

Parse error: parse error in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ron.php on line 95

Expand|Select|Wrap|Line Numbers
  1. <?php 
  2.  
  3. //update to reflect LIVE server
  4. require_once('incs/conn.php'); ?>
  5.  
  6. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <title>Zip Code Results</title>
  11. <style type="text/css">
  12. <!--
  13. body,td,th {
  14.     font-family: Verdana, Arial, Helvetica, sans-serif;
  15.     font-size: 12px;
  16.     color: #000066;
  17. }
  18. body {
  19.     background-color: #CCCCCC;
  20. }
  21. .search {
  22.     width: 300px;
  23.     left: 100px;
  24.     position: absolute;
  25. }
  26. .seek {
  27.     background-color: #FFFFFF;
  28.     font-weight: bold;
  29.     font-variant: small-caps;
  30.     width: 100px;
  31.     display: inline;
  32. }
  33. -->
  34. </style>
  35. </head>
  36.  
  37. <body>
  38. <?php
  39.  
  40.  
  41. //get the zip code from the form
  42. if ($_POST['zip'] > '') {
  43. $zipcode = ($_POST['zip']);
  44. }
  45. echo "<br>Here are the results for zip code: <div class=seek>$zipcode</div><br> ";
  46. echo "<br><font color=#0072bc size= 3><b><u>Publisher Information</u></b></font><br><br>";
  47. //Find the publishers using that zipcode
  48. $dbname = 'adnet';
  49. mysql_select_db($dbname);
  50. $query_publisher = "SELECT p.`pdata_id_publisher`, p.`pdata_zipcodes` FROM publisher_data p where `pdata_zipcodes` LIKE '%$zipcode%';";
  51.  
  52. //echo"$query_publisher <br>";
  53. $result = mysql_query($query_publisher) or die("Couldn't execute query");
  54. if(mysql_num_rows($result) > 0) {
  55. $row = mysql_fetch_assoc($result);
  56. $Publisher_id =  $row['pdata_id_publisher'];
  57. $Owned_Zip =  $row['pdata_zipcodes'];
  58.  
  59.  
  60. //    echo "<b>Publisher ID:</b>$Publisher_id<br><b>Zip Codes:</b>$Owned_Zip<br><br>";
  61.  
  62.  
  63.  
  64. // Get the publishers details
  65. $dbname = 'adnet';
  66. mysql_select_db($dbname);
  67.  
  68.    $sql2 = "SELECT d.`jobno`, d.`contact`, d.`phone` FROM db_publishers d    WHERE d.`id_publisher` = '$Publisher_id'";
  69.    $result2  = mysql_query($sql2) or die(mysql_error());
  70.  
  71.    while($row = mysql_fetch_assoc($result2)) {
  72.  
  73.     $contact=$row['contact'];
  74.     $phone=$row['phone'];
  75.     $jobno=$row['jobno'];
  76.  
  77.  
  78. echo "&nbsp;&nbsp;<b>Publisher:</b>$name<br>&nbsp;&nbsp;<b>Phone:</b>$phone<br>&nbsp;&nbsp;<b>Job No.</b>$jobno<br><br>";
  79.    }
  80.  }
  81.  
  82.  
  83. // Get the Calendars details
  84. $dbname = 'adnet2009';
  85. mysql_select_db($dbname);
  86.  
  87. $sql3 ="SELECT d.community,d.code,d.deleted  FROM db_publication_report d WHERE d.`zip` LIKE '%$zipcode%' AND d.`id_publisher` = '$Publisher_id'";
  88. $result3 = mysql_query($sql3) or die(mysql_error());
  89. if(mysql_num_rows($result) > 0) {
  90.  while($row = mysql_fetch_assoc($result3)) {
  91.  
  92.  
  93.     $community = $row['community'];
  94.     $code = $row['code'];
  95.     $deleted $row['deleted'];
  96.  
  97.     if ($deleted == 1){
  98.     $deleted = "Inactive";
  99.     }
  100.  
  101.     if ($deleted == ''){
  102.     $deleted = "Active";
  103.     }
  104.  
  105.     echo "&nbsp;&nbsp;<b>Community:</b>$community<br>&nbsp;&nbsp;<b>Published Editions:</b>$code<br>&nbsp;&nbsp;<b>Status:</b>$deleted<br><br>";
  106.    }
  107.  }
  108.  else {
  109. // Print an error if no user is found.
  110.    echo "No Publisher was found in that zipcode";
  111.  }
  112. ?>
  113. <div class="search"><br><strong>Search Again</strong>
  114. <form name="form1" method="post" action="ron.php">
  115.   <label>
  116.   <input name="zip" type="text" id="zip" maxlength="5">
  117.   </label>
  118.   <label>
  119.   <input type="submit" name="button" id="button" value="Submit">
  120.   </label>
  121. </form></div>
  122.  
  123. </body>
  124. </html>
  125.  
  126.  
Feb 11 '09 #8

P: 88
Expand|Select|Wrap|Line Numbers
  1.   $sql3 ="SELECT d.community,d.code,d.deleted  FROM db_publication_report d " . 
  2.     "WHERE d.`zip` LIKE '%$zipcode%' AND d.`id_publisher` = '$Publisher_id'";
  3.   $result3 = mysql_query($sql3) or die(mysql_error());
  4.   if(mysql_num_rows($result) > 0) 
  5.   {
  6.     while($row = mysql_fetch_assoc($result3)) 
  7.     {
  8.       $community = $row['community'];
  9.       $code = $row['code'];
  10.       $deleted $row['deleted'];
  11.       if ($deleted == 1){
  12.         $deleted = "Inactive";
  13.       }
  14.       if ($deleted == ''){
  15.         $deleted = "Active";
  16.       }
  17.       echo "&nbsp;&nbsp;<b>Community:</b>$community<br>&nbsp;&nbsp;<b>" . 
  18.       "Published Editions:</b>$code<br>&nbsp;&nbsp;<b>Status:</b>$deleted<br><br>";
  19.       }
  20.     }
  21.   } else {
  22.     // Print an error if no user is found.
  23.     echo "No Publisher was found in that zipcode";
  24.   } 
Close the While as above. Try and use indentation when dealing with loops or conditional statements as its easier to see whats going on.

Cheers.
Feb 11 '09 #9

P: 9
I am wondering if there is a way to include the 3rd query in that first if statement.

Because the 2nd and 3rd query both need the publisher id it seemed to work with 2 but like I said a 3rd it breaks. I used the above code but still got an error.

BTW the indent is a lot easier to read, thanks for that tip ;o)
Feb 11 '09 #10

P: 88
This code has no syntax errors: you did have a couple of bugs in that previous code you had pasted. Anyway see if this works:

Expand|Select|Wrap|Line Numbers
  1. <?php  
  2. require_once('incs/conn.php'); 
  3. ?>
  4.  
  5. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
  6. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  7. <html xmlns="http://www.w3.org/1999/xhtml">
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  10. <title>Zip Code Results</title>
  11. <style type="text/css">
  12. <!--
  13. body,td,th {
  14.     font-family: Verdana, Arial, Helvetica, sans-serif;
  15.     font-size: 12px;
  16.     color: #000066;
  17. }
  18. body {
  19.     background-color: #CCCCCC;
  20. }
  21. .search {
  22.     width: 300px;
  23.     left: 100px;
  24.     position: absolute;
  25. }
  26. .seek {
  27.     background-color: #FFFFFF;
  28.     font-weight: bold;
  29.     font-variant: small-caps;
  30.     width: 100px;
  31.     display: inline;
  32. }
  33. -->
  34. </style>
  35. </head>
  36.  
  37. <body>
  38. <?php
  39.  
  40. if ($_POST['zip'] > '') {
  41.   $zipcode = ($_POST['zip']);
  42. }
  43. echo "<br>Here are the results for zip code: <div class=seek>$zipcode</div><br>
  44.   <br><font color=#0072bc size= 3><b><u>Publisher Information</u></b></font><br><br>";
  45.  
  46. $dbname = 'adnet';
  47. mysql_select_db($dbname);
  48. $query_publisher = "SELECT p.`pdata_id_publisher`, p.`pdata_zipcodes` 
  49.   FROM publisher_data p where `pdata_zipcodes` LIKE '%$zipcode%';";
  50.  
  51. $result = mysql_query($query_publisher) 
  52.   or die("Couldn't execute query");
  53. if(mysql_num_rows($result) > 0) 
  54. {
  55.   $row = mysql_fetch_assoc($result);
  56.   $Publisher_id =  $row['pdata_id_publisher'];
  57.   $Owned_Zip =  $row['pdata_zipcodes'];
  58.  
  59.   $dbname = 'adnet';
  60.   mysql_select_db($dbname);
  61.  
  62.   $sql2 = "SELECT d.`jobno`, d.`contact`, d.`phone` FROM db_publishers d  
  63.     WHERE d.`id_publisher` = '$Publisher_id'";
  64.   $result2  = mysql_query($sql2) or die(mysql_error());
  65.  
  66.   while($row = mysql_fetch_assoc($result2)) 
  67.   {
  68.     $contact=$row['contact'];
  69.     $phone=$row['phone'];
  70.     $jobno=$row['jobno'];
  71.  
  72.     echo "&nbsp;&nbsp;<b>Publisher:</b>$name<br>&nbsp;&nbsp;<b> 
  73.       Phone:</b>$phone<br>&nbsp;&nbsp;<b>Job No.</b>$jobno<br><br>";
  74.   }
  75. }
  76.  
  77.  
  78. // Get the Calendars details
  79. $dbname = 'adnet2009';
  80. mysql_select_db($dbname);
  81.  
  82. $sql3 ="SELECT d.community,d.code,d.deleted  FROM db_publication_report d 
  83.   WHERE d.`zip` LIKE '%$zipcode%' AND d.`id_publisher` = '$Publisher_id'";
  84. $result3 = mysql_query($sql3) or die(mysql_error());
  85. if(mysql_num_rows($result) > 0) 
  86. {
  87.   while($row = mysql_fetch_assoc($result3)) 
  88.   {
  89.     $community = $row['community'];
  90.     $code = $row['code'];
  91.     $deleted = $row['deleted'];
  92.  
  93.     if ($deleted == 1){
  94.     $deleted = "Inactive";
  95.     }
  96.  
  97.     if ($deleted == ''){
  98.     $deleted = "Active";
  99.     }
  100.  
  101.     echo "&nbsp;&nbsp;<b>Community:</b>$community<br>&nbsp;&nbsp;<b>Published 
  102.       Editions:</b>$code<br>&nbsp;&nbsp;<b>Status:</b>$deleted<br><br>";
  103.   }
  104. } else {
  105.   // Print an error if no user is found.
  106.   echo "No Publisher was found in that zipcode";
  107. }
  108. ?>
  109. <div class="search"><br><strong>Search Again</strong>
  110. <form name="form1" method="post" action="ron.php">
  111. <label>
  112. <input name="zip" type="text" id="zip" maxlength="5">
  113. </label>
  114. <label>
  115. <input type="submit" name="button" id="button" value="Submit">
  116. </label>
  117. </form></div>
  118.  
  119. </body>
  120. </html>
Feb 11 '09 #11

P: 9
for some reason it cant find a variable "$Publisher_id" to run the last querry.
I think it looks for on in the first query and if it doesnt find one it prints out
No publisher was found


the error now is:


Notice: Undefined variable: Publisher_id in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\ron.php on line 89
Feb 11 '09 #12

P: 88
Can you give me an SQL dump of how your database is laid out and I will have a look at it.

Cheers.
Feb 11 '09 #13

P: 9
I didn't build the DB just inherited them. I would redesign the table layouts but that is for a total rewrite.



This is what I am trying to accomplish.

the user to type in a zip code through a web form to see if any publisher owns the zip code. If a match is found, the results will return the job number, contact name, phone number, status (active or inactive) of the publisher(s) owning the code. It should also display the calendar edition(s) covered by the zip code, and whether the edition(s) are active or inactive. If no match is found it will return a message saying that the zip code is available.
Feb 11 '09 #14

P: 88
OK this dump only has the table: db_publication_report none of the other tables.

Do you the publisher one (db_publishers) as well?
Feb 11 '09 #15

P: 9
I declared the Publisher_id at the top of the code just before the first connect to the db

like this
$Publisher_id='';
and no more errors

:o)
Feb 11 '09 #16

P: 88
OK good one. Glad its working for you.

Cheers :)
Feb 11 '09 #17

P: 9
thanks so much for your time today.
Feb 11 '09 #18

Post your reply

Sign in to post your reply or Sign up for a free account.