there are five tables (personTb, addressTb,churchTb) each holds data pertinent to an individual; (personAddress,personChurch) each hold the primary key for the person table and corresponding table IE personAddress holds primary key for addressTb. ​ both snippets work, my question is;** Is my join correctly formatted? ** select concat(personTb.p_fName,' ',personTb.p_mName,'. ',personTb.p_lName) AS Name, concat(addressTb.a_street,' ',addressTb.a_box,' ',addressTb.a_city) AS Address, concat(churchTb.c_name,' ',churchTb.c_city) AS Church from personTb, addressTb, churchTb where addressTb.a_ID= ( select personAddress.a_ID from personAddress where personAddress.p_ID=personTb.p_ID ) AND churchTb.c_ID= ( select personChurch.c_ID from personChurch where personChurch.p_ID=personTb.p_ID ); /* next is my attempt at a join */ SELECT concat(a.p_fName,' ',a.p_mName,'. ',a.p_lName) AS Name, …

Member Avatar
Member Avatar
+0 forum 3

I need the dates in a specific range.And i want to get the result in java manipulating from a MySQL database.Now how can i do so. Suppose there are 3 days 17.08.2011,18.08.2011 and 19.08.2011 .I want the dates in the range 16.08.2011 to 18.08.2011 .So how can i manipulate it in java code quering from database?

Member Avatar
Member Avatar
+0 forum 1

I need to use the mysql query result.following is the mysql query. [CODE] while($row = mysql_fetch_array($result)) { $name=$row['name']; } [/CODE] For example: result of above query is (name1,name2,name3...) The problem is... i need to return that result in the following function.How can i do it? [CODE] function results() { return array( 'name1' => t('name1'), 'name2' => t('name2'), 'name3' => t('name3'), ); } [/CODE] plz anyone help me.

Member Avatar
Member Avatar
+0 forum 2

If I put this line [ICODE]$friends = $connection->get('followers/ids', array('screen_name' => '2020volt'));[/ICODE] Twitter api returns something like this : [CODE]Array ( [0] => 173605790 [1] => 187372244 [2] => 17535566 [3] => 190756198 [4] => 184577861 [5] => 119247538 [6] => 183813521 [7] => 18013082 [8] => 149601084 [9] => 186491393 [10] => 19263381 [11] => 208430904 [12] => 25987409 [13] => 44706902 [14] => 198088252 ) [/CODE] Problem : My task is finding out how many (and who as well) of your followers are subscribed to my site. I built a database of the subscribers. But now I need to …

Member Avatar
Member Avatar
+0 forum 2

This is the part which searches and add the result to the 'pass' variable. At one stage I was getting a resource id number and found to get around that, but when I do this I get nothing on the pass variable [code] $result = mysql_query("SELECT `Pass` FROM `wiki` WHERE `User` ='" . $user ."'"); if ($result) { $row = mysql_fetch_assoc($result); $pass = $row['Pass']; mysql_free_result($result); } mysql_close($con); [/code] Can anyone help me please? Thanks

Member Avatar
Member Avatar
+0 forum 2

I am facing a query performance problem. While connecting to MySQL database through different Users methodology. Tell me does connecting by IP address user has over head. Like connecting using user@locahost or user@host-ip-address Is there any performance-wise difference by connecting using any of this user. I am getting a massive difference in performance by changing my db user to user@localhost. i.e. few some milliseconds to < 2 sec Where as the average response time using user@host-ip-address is greater then 1 sec to less 6 sec With Regards Naveed

Member Avatar
Member Avatar
+0 forum 3

I have a database and will search with that database.. I want to show only first 5 results in the page and generate the "next" button for the next 5 results and on the 6-10 results page generate "next" button for the next results and the "previews" button for the previews results.. Can any one code it in php..?? My table have three fields one field is name..... So want to display results via name because name repeats many times..

Member Avatar
Member Avatar
+0 forum 5

Hi, I`ve started doing PHP and MYSQL for a few months now and I am working on a project for a friend. Basically I had the code written down in mysql format and decided to change my code too mysqli. Everything was working fine except for one function. I keep getting this error [B]Warning: mysqli_fetch_array() [function.mysqli-fetch-array]: Couldn't fetch mysqli_result [/B]. Here`s my code connect to database [CODE] //DEFINE etc... function connect(){ //global $dbc; $dbc = mysqli_connect(HOST, USERNAME, PASSWORD, DB) or die('Cannot connect to MySQL! '.mysqli_connect_error()); return $dbc; } [/CODE] update function [CODE] function update_emp_job_position($emp_id, $job_id) { $dbc=connect(); // Turn autocommit …

Member Avatar
Member Avatar
+0 forum 6

Hi, I’m going to calculate a ratio between two entities but are having some trouble with the query. The principal is the same to, say a forum, where you say: A user gets points for every new thread. Then, calculate the ratio of points for the number of threads. Example: User A has 300 points. User A has started 6 thread. The point ratio is: 50:6 My schemas look as following: student([U]studentid[/U], name, class, major) course([U]courseid[/U], coursename, department) courseoffering(courseid, semester, year, [U]instructor[/U]) faculty([U]name[/U], office, salary) gradereport([U]studentid[/U], [U]courseid[/U], semester, year, grade) The relations is a following: Faculity(name) = courseoffering(instructor) Student(studentid) = …

Member Avatar
Member Avatar
+0 forum 1

Hi, I can't solve this problem: I have a query which fetches the contents of the page meta tags from a database. It works fine when I have the query on page but when I turn it into a function (which is placed in my functions file) and call it from the page it does not work. Here is the code: [code=php] function get_meta_keywords() { $q = "SELECT meta_tags FROM biology_notes WHERE section='2.1-cell-theory'"; $r = @mysqli_query($dbc, $q); $row = mysqli_fetch_array($r, MYSQLI_ASSOC); $meta_keywords = $row['meta_tags']; return $meta_keywords; } [/code] When I use it in this way I get the following error: …

Member Avatar
Member Avatar
+0 forum 3

Hello there I am a fairly new in MySQL/PHP/Javascript programming. I'm writing a web based gymnast profile management system for my final year project. Here's my problem. I have 5 MySQL InnoDB tables: [B]tests[/B], [B]testunits[/B], [B]points[/B], [B]testsgymnast[/B] and [B]gymnast[/B] I am able to retrieve a selected test which has particular units and each unit has a point associated with it using AJAX/PHP triple drop down list which is part of my Input Form called 'Create Gymnast Profile'. [B]My problem is that I don't know how to complete the creation of a gymnast profile by assigning multiple tests to a gymnast …

Member Avatar
Member Avatar
+0 forum 1

I am new to programing and am impressed with the ease of python/wxpython. I have written useful wx programs to enter data into MySQL databases, but am stuck on making a useful wxpython MySQL query progam. I have had success writing query apps in python. I'm hoping to find a code sample/template in wxpython to query a mysql database, preferably with a "like" search term. Load results to list or combo with the ability to select specific results to printable list.

Member Avatar
Member Avatar
+0 forum 2

I have a table with 15,00,000 rows which has a column PERMLINK which is used in 'where' clause of my select queries. To speed up query I have used it as INDEX. What size of index is optimum for names.? and I have a new idea but don't know how mysql really works. I'm thinking of adding 3 columns a1,a2,a3 which are to contain first 3 characters of permlink and use new index (a1,a2,a3). Consider the table below ID permlink 1 aaa 2 aab 3 aac 4 aba 5 abb 6 abc 7 aca 8 acb 9 acc 10 baa …

Member Avatar
+0 forum 0

Hey. I've got this code, [CODE] // query article $query1 = "SELECT * FROM (articles LEFT JOIN authorisation ON articles.page_id = authorisation.page_id LEFT JOIN authors ON articles.author_id = authors.author_id) WHERE articles.page_id NOT IN (authorisation.page_id) ORDER BY issue ASC"; $mysql_result1 = mysql_query ($query1) or die ("Query '$query1' failed with error message: \"" . mysql_error () . '"'); // Print while($row = mysql_fetch_array($mysql_result1)) { echo ' <tr> <td>"' . $row['page_title'] . '"</td> <td> (' . $row['page_id'] . ')</td> <td class="lightgrey">' . $row['author'] . '</td> </tr> <tr class="comment"> <td colspan="3" id="comment' . $row['page_id'] . '">' . $row['authorisation_comment'] . '</td> </tr>'; } [/CODE] , …

Member Avatar
Member Avatar
+0 forum 6

The End.