Tagged Questions
0
votes
1answer
20 views
Show dates that are open for registration and option to register
I have 3 tables:
Members:
| Member_ID | Name |
--------------------
| 1 | John |
| 2 | Pete |
et cetera....
Courses:
| Course_ID | Date | Time | Name | ...
0
votes
1answer
38 views
PHP/MySQL double loop
I am working on a directory where some of the listings have a images associated with them and others do not. I am wondering how I can write a loop within a loop to get my results.
Example, User ...
0
votes
0answers
69 views
PHP comments with replies. How to loop
I am building an application that let's users add their own contribution to a stream of posts, and these are ordered ascending by contribution ID (i.e. comments display one after the other in the ...
1
vote
2answers
28 views
Changing time increments on loop, carring over into next hour when not divisible by 60
Below is the code for a FOR loop that renders out a list of times as so:
...etc...
8:45 am
8:50 am
8:55 am
9:00 am
9:05 am
9:10 am
...etc.
This is a script that runs a five minute interval, and ...
-3
votes
2answers
32 views
How do I loop in PHP and get multiple rows returned from MySQL database?
I have made a log in system which asks for email activation. It all works fine. However, there is no real 'spam' protection. When the user creates an account, it inserts a row with the column ...
0
votes
1answer
43 views
Check and exclude in FOR loop PHP if $value is one of the rows
and thankyou for reading my question. Using a for loop in PHP, I was looking to accomplish an echo for a list of times (offset by 5 minutes) in between an open and closing time of a business. That ...
0
votes
1answer
42 views
php while loop will not increment database column
I have a function like this:
function searchSingleUrlGraph($mysql){
$query="SELECT * FROM `dailydata` WHERE `userid`='".$_SESSION['userdata']['userid']."' AND `url`='faboolis.com'";
...
0
votes
2answers
39 views
How do I perform this query without relying on looping in PHP?
I'm brand new with MySQL. It appears like I need to do some sort of loop in a MySQL request, but I think it could be way more efficient with some "INNER JOIN" stuff.
Here is my PHP code:
$query = ...
0
votes
2answers
25 views
How to iterate through a set of database results in AJAX
problems iterating through a set of MYSQL data using AJAX. I can display the first record but there are 7 record in total. I tried couple of approaches with no success.
THe AJAX script:
<script ...
0
votes
1answer
48 views
Codeigniter / PHP, 2 Mysql Tables, Multiple Queries
I have 3 tables 1 is an item table, one is a note table and the other is a note image table.
When a user views item details, all notes are picked up for that item (there is a item_id field in the ...
2
votes
1answer
22 views
MySQL cursor fetching same result twice
I've got a Stored Procedure that checks rows from one table to insert its details into another. I'm using a cursor but I have a big problem: the cursor loops 2 times over the same row. So I get 2 ...
0
votes
1answer
34 views
DB of URL Rewrites - Need to point all old URLs to the same new URL
I have a table in my site's database (Magento, but that's irrelevant as I'll be working with my data outside of Magento) full of URL rewrites. This table has existed for quite some time and my URLs ...
1
vote
1answer
57 views
PHP foreach loop with multiple index variables
Can anyone see what is wrong with the following code?
I'm trying to carry out a foreach loop on 2 arrays from a form.
Form Code:
<td>
<input type="checkbox" name="PR[]" ...
2
votes
4answers
78 views
page not displaying correctly
I have the code below. It runs fine until the last point. It seems to just just off and stop displaying the rest of the page after the // Close Main while loop comment and I cannot seem to work out ...
0
votes
1answer
23 views
Select union all cursor
I have the following tables
tab_1:
(rs)
rs1
rs2
rs3
tab_2:
(rs) (cell) (tf)
rs1 A549 tf1
rs1 C555 tf2
rs3 B333 tf1
I need to loop on the tab_1 only column and check:
SELECT ...