Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    PHP


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Multiple Navigation Tables On One Page (master - Slave)


I just wanted to refresh only part of the page, i.e., table2 on my php page. here is my javascript code which performs the refresh it works fine and my php file display all the records. the only problem is: I have got two tables on the same page and i only want to refresh the second table when i click the a row of my first table rows. Code:




View Complete Forum Thread with Replies

Related Forum Messages:
Master FORM Which Selects Between Slave FORMS...
I wish to have a simple multi-dropdown donate option, the user selects a pre-defined amount from dropdown1 then they choose the payment gateway (paypal, stormpay, e-gold, intgold etc) from dropdown2, then click Go!

However, each of these gateways code is embeded on the page as a form (as buttons, no input required).

Is there a way to use a "master" form in php, which selects between multiple other "slave" forms via a dropdown select and submits that value?

I also need a dynamic "payment amount" as dropdown menu (or text input) menu which inserts its value (amount to donate) anywhere on the page as a dynamic php include... (including form value fields) so when the master form is submitted, the "payment amount" include will refresh the value within any of the sub forms vaules upon submitting the MASTER form.

View Replies !
Multiple Tables Print To One Page
Is it possible to print information from multiple databases on one page/form.  For example, I want to print information that is in three databases, and I want to be able to print a few related fields on one page.  Is that possible?

View Replies !
Creating Master-Detail Page
I have an array that holds all of the information I want displayed. Dreamweaver, on the other hand, uses a MySQL statement stored in a variable...

As such, I'm wondering if any of you out there know how to create a master-detail page that has a first page, previous page, next page, and last page link that allows me to display 10 records at one time.

Also, when I go to the detail page, I especially need to know how to get the specific row's information transferred. If anyone has any ideas, that would be great.

View Replies !
Generating Multiple Alternating Columns And/or Tables Within Tables
I am having a little bit of trouble generating the code for a table with 2 columns. The columns contain tables within themselves. Not sure why as that part was an existing design. Here is the output so far and it is correct but not how i want it to be (i'll explain) Code:

View Replies !
Multiple Pages For Navigation
can any one tell me simple Multiple Pages for Navigation script in php ?

View Replies !
Very Simple Navigation Menu With Multiple Levels
im getting my self really confused i think im thinking way to complicated about this. Basically i want a very simple navigation menu with multiple levels eg. Code:

View Replies !
Slave Servers Are Up
I have some slave servers setup, and are working fine as they should. I'm running mysql on linux. I need to know that the slave servers are up at all times. To find out, I have to login to mysql (# mysql -u db_user -p) and issue the command: SHOW SLAVE STATUS G
Unfortunately, I can only do the above manually from the commandline. Is there a way to automate it in PHP.

View Replies !
Selecting Multiple Values From Multiple Tables Using Checkboxes
I've been struggling with this for a bit but cannot seem to find a simpler, cleaner way of doing this.

a. I have a Table A - Customers , Table B - Contacts .
b. I have a form where a user types the first few alphabets of a customer name and then gets a list of contacts, cities.
c. The user is supposed to select multiple options from this list and then send that data to another form for processing.

I'm able to only pass data from Table A, not from B . Could someone please have a look at the 2 snippets of code and advise? And is there a way both these php scripts could be combined in a single one ? Code:

View Replies !
Grabbing Data From Multiple Tables For Multiple Requests
Here's what I'm trying to get at.

A table that displays all the Process Server's name, the number of summons's he has out within 7 days, 7-14 days and 15+ days...pretty simple, it's just a report so management can stay on top of how many papers are out.

I've got the server_information table with the server name and ID. and a case_information table with the serverID.

I've got a while loop that displays all the server's name, the problem is when I try to get the # of cases....here's what i've got so far. Code:

View Replies !
How To Do Page Navigation Bar Using Php Codes?
I would like to know how to set up a page navigating system in a web site using php codes.

View Replies !
Keep An Html Page And Use Php For Navigation
How can i keep an html page and use php for navigation so it can be easily updated.

View Replies !
How To Create The Navigation Page
how to create the navigation page in php. The navigation should be from first page,next page,end page,and previous page.Give an example to code for the navigation page.

View Replies !
Page Navigation From Search Results
I have created a search form that searchs for results from my database matching the criteria to what ever the user inputs. I have done this using 2 php pages the first page points to the second, where the data is sanitised and cleaned accordingly. The results are displayed on the 2nd page. Code:

View Replies !
Home Link From Navigation Page
I got a code which helps me to create navigational links and only show 4 results per page. Now I want to add a link on each page such that if anyone clicks on that link it takes it to HOME page. I have added

<a href="Home.htm"><b><font size="4">Home!!</font></b></a>

inside the loop that generates NEXT and PREVIOUS page link but whenever I click on HOME it does nothing at all.

View Replies !
Navigation Back To An Html Page
I can't seem to figure out how to navigate back to an html page from a php page.

View Replies !
Adding Page Navigation To Record Set
I have gone through the tutorial on php freaks for adding page navigation to records. I am in the middle of integrating the page navigation and have stuck on  2 areas.

1)
I have a page which displays a set of records (limited to 6 per page)
Below,is the Next and Previous navigation text bUt it is not hyperlinked!!!?? 

The line of code specifically is:

<?php
echo("<a href="$PHP_SELF&page=$pageprev">PREV".$limit."[/url] ");  - This should be hyper-linked but is not??

I think there could be a problem with the <href bit being AFTER the <?php. I am basing this on the fact that a previous record i made began the hyper-link <href BEFORE the <?php where as before the <?php was added only after : Code:

View Replies !
Multiple Users, Multiple Tables, One Form
I have a small group of users that will submit their 'goals' via one form (placed in a postnuke block). I have created one table (mysql) for each user to collect collect their goals. I need some direction in writing the php that will submit the form data to the correct table based upon the users Postnuke login.

View Replies !
Automating Page Navigation And Control Transfer
Is there a system available to do the following:
consider an app of a few pages:

page1.php:
form1----->page3.php
form2----->page4.php

page2.php:
form3----->page3.php
form4----->page4.php

when I am at page3.php, I do not know whether I came there from
page1->form1 or page2->form3.
I can check for $_SERVER['HTTP_REFERER'] and get an answer. But this
example is simple. Let us generailze that I want an app that keeps a
track of all the pages the user requested, in the order that they were
sent to him.

Obviously, it can be written based on sessions. Is there already some
popular open source application for this?

Also, this brings me to a broader question of page navigation rules. In
an app made of 20-50 pages/scripts, life will be hell if there is no
systematic approach to transferring control between pages. Is there
some kind of structure already made and readily available into which
you just plug-in your pages by telling some rules ?

E.g. the scheme is something like:
$ListOfPages = array(
1=>"Main.php",
2=>"Edit.php",
3->"Add.php",
..........,
N->"Error.php");

$RuleSet = array(
1=>array("Main.php","Edit.php","allow_edit"),
2=>array("Main.php","Add.php","allow_add"),
...................
3=>array("Main.php","Error.php","my_error_handler")
);
The RuleSet is a set of page transfer rules based on evaluation to true
of the specified functions, i.e., allow_edit(), allow_add(),
my_error_handler() etc.
Obviously, form submission is the chief means of control transfer for
PHP programs and the use of ?op=add_something in URL's(GET) and <input
type=hidden name=op value=add_something> (POST) are a step towards
making some kind of structure.

So the grand code will look like:
$MyGrandAppControllerObj = new GrandAppControllerObj();
$MyGrandAppControllerObj->setPages($ListOfPages);
$MyGrandAppControllerObj->setRules($RuleSet);
$MyGrandAppControllerObj->Run();

View Replies !
Page Numbering - Change My Navigation Menu
i am busy with a image gallery and i have it working. but now i want to change my navigation menu this one: [1] [2] [3] [4]  to:

<<first [1] [2] [3] [4] [5] [6] last>> i have also this code, (c second code ) but i cant link it to my foto folder and unsort it from 10 to 1 ,like the newest u c first. Code:

View Replies !
AVG() Through Multiple Tables?
I'm trying to get the average of several columns [all with the name of SIR] in several different tables, and display the result. My code is giving me a "please check the manual depending on your MySQL version.." error. Here's my code:

View Replies !
Multiple Tables
Is there a way to truncate multiple tables in one query?This deletes all from only 1 table: PHP Code: $sql = "TRUNCATE table1"; $result = mysql_query($sql,$connection);I've tried to add "AND table2" but that's not working.

View Replies !
Multiple Tables
I'm putting together a shopping cart and have run into a problem. I have my cart table storing the users chosen shopping cart info, then multiple tables storing the details of each category of products. For example books, music , dvds etc. What I can't figure out is if it is possible to call multiple product records in my join statement. Can I loop through a list of my product categories somehow or how can I do this? PHP Code:

$sql= "select * from cart inner join $cat on cart.itemId = $cat.$catId where cart.cookieId = '" . GetCartId() . "' order by $cat.title asc";

View Replies !
Inserting Into Multiple Tables?
I need to increment the value of 'id' in 5 tables whenever it is incremented in another table.... Is there any way to do this? How?

View Replies !
Handles Multiple Tables
I have a roster script that handles multiple tables ($orderof) and within those tables multiple divisions ($sword). The only problem is that, nothing is getting displayed -- though there are no errors (systematic [to my knowledge] or parse). PHP Code:

View Replies !
Getting Data From Multiple Tables
I was wondering if anyone can tell me how to get data from several tables and save them in variables for further processing?

View Replies !
One Form, Multiple Tables
I have a form which is used insert data into multiple tables. Each table relies on the data inserted from the previous table. The problem I think I am having is that the data is not avialable by the time the next query is run. code:

View Replies !
Searching Multiple Tables
I am trying to create a search system for an existing database.
Because of the way the database is setup, I need to traverse three
different tables, gathering information:

1) Go into table1 and lookup show_id by show name. (For instance,
let's say I am looking for the Mickey Mouse show. I look it up and
find that it's show_id is 6)

2) Go into table2 and lookup all attendee_ids for show_id 6. (For
instance, I lookup show_id 6 and find 5 attendees. 1, 2, 3, 4 and 5
are the attendee_id's)

3) Go into table3 and lookup attendee names, from the 5 attendee_ids.
(For instance, I lookup 1, 2, 3, 4 and 5 to find their names are Jane,
Alice, Tom, Peter and Greg.)

I am not free to adjust the tables, so I have to stick with what is
there. There may be an SQL statement that could do all this in one
command, but I am no SQL expert. I was wondering if anyone had some
PHP oriented solutions. I can get the show_id, no problem. I seem to
be having a problem with the rest, as it involves arrays. After I go
into table2 and get all the attendee_ids, I get an array of
attendee_ids that I need to search table3 for, to create a new array
of attendee names.

View Replies !
Can I Get PHP To Query From Multiple Tables?
I will have several tables in my database, several of which will contain similar products. Is there a way to set up my pages where PHP will get the items I request from EACH table?

View Replies !
Recordset From Multiple Or All Tables
Can somebody please help me with a simple solution to search either multiple or ALL Tables in a MYSQL Database.

I have a Table for each Merchant.
I need to introduce a Product Search facility accross ALL merchants Tables.

The way it works now is retrieval is confined to each Merchants own Table:
$query_TEST = "SELECT * FROM T101 WHERE product = 'widget'";

I need to search tables from T101 upwards as they are added.
I suppose it's too much to hope that MYSQL will accept wild cards.

Pleae tell me there is a simple way to do this that is not affected as Merchants/Tables are added/removed ongoing.

If this is too cumbersome for me to introduce and maintain, I could at this point retreat to a single Table and use a Merchant Code to select content for each merchants own pages.

My PHP skills are at the evolving stage, so please keep it very simple to understand if possible.

View Replies !
Multiple MySQL Tables
I need some help with tables in MySQL.
I am making a colums of articles in my site.
It has 3 posters that post articles.
I make a little serach page to search for words into articles.

I have the sintax below working, but I need to know what is the syntax
to it select words from several tables. Every table is for a poster
and all tables are in the same DB and have the same fields.

---------------
$searchword="SELECT * FROM table WHERE comment LIKE
'%$searchstring%'";
---------------

I tried
---------------
$searchword="SELECT * FROM table, table1, table2 WHERE selected_row
LIKE '%$searchstring%'";
---------------

and even make an ARRY for table, table1, table2 but it does not work.

View Replies !
Selecting From Multiple Db Tables
I have a table called officers with fields id, office, abbr, member. I have a table called profiles with many, many fields, but of interest, firstname, lastname, badge, and primaryEmail. The fields member and badge are the same (or could be if the person holds an office).

I want to select firstname, lastname, and email from profiles where the member in officers equals badge in profiles (member and badge are both INTs). Does that make sense? Can someone help me? If possible, including an explanation of what is going on so that I can do it myself in the future.

View Replies !
Relationships With Multiple Tables
I am still somewhat new at this stuff, been able to modify code to my likings, but am starting to write my own script for my schedules. I am having difficulty trying to build a relationship with different tables. Code:

View Replies !
Multiple Inserts Into Different Tables
I want to list these variables up to 50 then insert the variables into the table. EXACTLY how should I write the code:

View Replies !
Upload To Multiple Tables
I want to create a form that will upload information into a db but I am not sure if I need to use multiple tables. The information is pretty basic really but there will be alot of info to upload, all of which needs to be linked.

The general company info is
Name
Address
Suburb
State
Country
Postcode
Phone
Fax
..and other fileds

Linked to this will be another form that allows them to upload position information such as

positio title
description
hrs of work
responsibilities
...etc

How do I link this information so that once they have uploaded the company information they move on to upload position information.  They may have multiple positions that need to be uploaded and may choose to do it at different times.

View Replies !
Multiple Identical Tables
im have a database that stores data per week, in multiples tables that are identical. How can I select the data from multiple tables ? example in both tables i ahve the serial and agen field so i tryed SELECT serial, agen FROM week1,week2 WHERE agen=¼¢' .

View Replies !
[B]SELECT From Multiple Tables
Trying to select data from up to eight tables, with the common column being the file_id column.

Cutting the query down to just three columns I am using:

$query = "SELECT *
FROM tbl_name,
tbl_branch,
tbl_details
WHERE tbl_name.file_id = tbl_branch.file_id AND
tbl_name.file_id = tbl_details.file_id";

I'd take a guess that's this a fairly clumsly query, but the trouble I'm having is that not all the results are being listed. I gather that this is because although there are 20 file_id's in the tbl_name, not all the other tables are complete. so tbl_branch only has 15 entries, and tbl_details only 12. Is there a better way to structure the query? And can I have results appear as 'blank' if there is an entry in tbl_name but no linked entry in tbl_branch? If so. any clues?

View Replies !
Select From Multiple Tables
I'd like to select data from several tables (more than 2) to show the last entries among all tables. Ex : I have 3 tables : "cd", "book" and "dvd" with "title" and "date" fields. What I want to get is something like this :

1. misery [book]
2. titanic [dvd]
3. gladiator [dvd]
4. kill bill [cd]
5. discworld [book]

number 1 being the most recent entry.

I tried " SELECT * FROM cd, book, dvd ORDER BY date LIMIT 5" but of course it doesn't work. I didn't find any solution?

View Replies !
Multiple Tables Query
Below I am adding all dollar amounts from a column in a table called transactions. Code:

View Replies !
Insert To Multiple Tables
I am trying to learn relational database design and usage. I get the normalization and the multiple tables part. I am begining to understand getting data out form multiple tables. But, what I still don't get is how to insert the data from one form into multiple tables. Who knows maybe I'm not getting something else too. I have a form that will require 222 fields. Yes, yikes. So, naturally, I'm setting it up as a relational database. I've ended up with 19 tables.

The form does not flow in the same order as the tables. For instance, say I have customer_info, claim_info & damage_info. The form does not first gather the customer info, then the claim info, then the damage info in a nice orderly fashion. The fields for each of the 19 tables are "scattered" throughout the form. This being said, do I need to create 19 insert commands each with the corresponding fields? I can find all sorts of tutorials on designing the db, extracting the info, but not one on how to get the info in.

View Replies !
Search Multiple Tables At Once
I have about 50 or 60 tables, and I want to be able to search each table to search for a specific username, and to count how many tables the user is found in. Can I do this with a loop? The username may or may not exist in all tables, so I'm not certain if the loop will time out not finding a name, or if will just stop at the first table it doesn't find a match.

I'd like to really try and figure this on my own, as I'm slowly getting better here with php. But if someone can just give maybe a Yes or No answer, and which loop to would be best (ie a for loop or while loop).

View Replies !
Echoing From Multiple Tables
Here is another situation when I need the PHPBuilder’s experts help. My health-related site is currently echoing news articles from one specific subject (arthritis). The table has about 100 rows with a few standard fields (ID, title, content… etc). It works fine as it is.

What I would like to do now is to echo not only from the arthritis table but also from two other tables (alzheimers and cancer). All the tables are in the same database. So that this random 5 articles will be coming not from one single table (arthritis) but from all three. Btw, all 3 tables have the same structure. This is the current (simplified) code with only one table. Code:

<?php
$hostname="myserver.net";
$username="myusername";
$password="mypass";
$dbname="mydb";
$usertable="arthritis";

mysql_connect($hostname,$username,$password) or die(mysql_error());
mysql_select_db("$dbname") or die(mysql_error());

$data = mysql_query("SELECT * FROM $usertable ORDER BY RAND() LIMIT 5")
or die(mysql_error()); while($info = mysql_fetch_array( $data ))

echo $info['title'];
echo "<br>";
echo $info['content'];
?>

View Replies !
Get Results From Multiple Tables
Current query selects a list of dates from stats when there have been clicks during a time period and later checks other tables date by date for these dates:

$SQL = "SELECT DISTINCT DATE_FORMAT(time, '%Y-%m-%d') dt FROM stats WHERE ".$TimePeriod." ORDER BY ";

Problem is that there might be sales on dates where there are no clicks (returning visitors)... so i it possible to get dates from both stats and sales tables into one result field through some kind of JOIN and then check these results date by date.

e.g. something like this, but I get an error with this:

$SQL = "SELECT DISTINCT DATE_FORMAT(stats.time, sales.time, chargebacks.time, '%Y-%m-%d') dt FROM stats,sales,chargebacks WHERE ".$Time." ORDER BY dt";

View Replies !
Search Multiple Tables
I understand from other threads that FULL TEXT search is not possible when using multiple tables. I am trying to develop a search function that enables a keyword to be entered into a textbox- the user hits enter and a list of sections with relevant titles and URL's is displayed. Code:

View Replies !
Query Multiple Tables
I'm trying to run a query across three tables on my site - jobs, news, and articles. Each table has different field names - I've run a successful UNION query, but it hasn't allowed me to extract the fields I want - I keep getting column number errors. I found a very useful post from Leatherback saying to put the results into an array http://www.phpbuilder.com/board/show...t=union+fields:

I've come up with the following on the basis of that, but I keep getting "mysql_num_rows(): supplied argument is not a valid MySQL result resource" as an error. Could anyone advise why please? I'm not getting any SQL errors. PHP Code:

$search = $_GET['search'];
$newsquery = $connector->query("SELECT id, title, UNIX_TIMESTAMP(dateadded) AS dateadded, article FROM news WHERE article LIKE '%$search%'") or die ("Error in Query: $query.".mysql_error());;
$jobsquery = $connector->query("SELECT id, company, jobtitle, jobdesc, contact, UNIX_TIMESTAMP(dateadded) AS dateadded, UNIX_TIMESTAMP(closingdate) AS closingdate, oxford FROM jobs WHERE jobdesc LIKE '%$search%' ORDER BY dateadded DESC") or die ("Error in Query: $query.".mysql_error());;..........

View Replies !
Want To DELETE Row FROM Multiple Tables
I'm looking to delete a single row from multiple tables where they all share a common column name, primaryKey, and a common value - $POST_[primaryKey]. Here is the code:

$query="DELETE FROM assetinfo, emplhistory, income, newuser, preliminfo, primarydata, reoinfo, residencehistory WHERE primaryKey='$_POST[primaryKey]'";
            
            $result=mysqli_query($connection, $query) or die (mysqli_error($connection). "                                 <br> Could't run DB Query to Delete Borrower");

And here is the error msg I'm getting:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE primaryKey='jarreola2'' at line 1
Could't run DB Query to Delete Borrower

Is my query valid? Any other ideas on how to delete a row from multiple tables?

View Replies !
Insert Into Multiple Tables
Is it possible to Insert data into multiple tables in a single squery.

e.g. can I do something like this.

INSERT INTO table1, table2 ('field1', 'field2', 'field3', field4') VALUES 'value1', 'value2', 'value3, 'value4'

where field 1 and 2 are properties of table 1 and are required to have values 1 and 2 inserted respectively.

View Replies !
Select From Multiple Tables.
i am right in thinking that in theory you can do an sql query like: sql=select * from tbl1, tbl2, tbl3 etc...? or would you have to do it another way?

View Replies !
Multiple Tables - RS Paging
I have a sales leads DB that is accessed by my employees whom all have different levels of access (1-9). The sales leads all come from one DB and the employee access level comes from another.

Every sales lead in the sales DB has been assigned to an employee. Ex: leadID=3, which_lo=4 as long as which_lo #4 has access level greater than 5.

lead_list_builder.php =
Creates a list of all leads that have been assigned to a particular employee that will link to a details page for that leadID Ex: SELECT leadID, which_lo FROM leads WHERE which_lo = 4;

My problem is on the details page. Code:

View Replies !
Deleting From Multiple Tables
I want to delete data from two tables. How do I do this? Below query doesn't work. Problem with syntax I think. Get this error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'AS s INNER JOIN details AS d ON s.ffnumber = d.ffnumber WHERE s PHP Code:

$query = "DELETE FROM student AS s ".
                  "INNER JOIN ".
                  "details AS d ".
                 "ON s.ffnumber = d.ffnumber ".
                  "WHERE s.ffnumber = '$value' ".
                 "AND ".
                 "d.ffnumber = '$value' ";

View Replies !
Selecting From Multiple Tables
I have a couple tables I'm trying to pull information from and display but something's not going right. The query returns the correct info when I put it into phpmyadmin, and mysql_num_rows shows that rows were returned but it won't display for some reason. The line br is output but other than that the html comes up blank. Any ideas? Code:

View Replies !
Multiple Tables Auto_increment Id ?
I have a database called "links" with two tables "google" and "yahoo" The structure for the tables are the same id and name is there any way of having both tables have auto increment ids?

Say for example I have cron update each a script which adds what I need added to the tables for google and yahoo. Code:

View Replies !
Multiple Tables In Result
I'm using MS SQL not mysql. I'm sending multiple SQL statements to mssql_query and I then need to know how many tables are in the returned result. So If I send the query:

$sql = "select * from table1
select * from table2
select * from table3";

$result = mssql_query($sql, $link)

How can I then get the total number of tables in the result? Obviously in my example I know there are 3, but how can I tell this in code? I tried this: Code:

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved