Hi,
I though this would probably be the best place to ask.
I am looking to get started on PHP and MySQL. I am familiar with programming, but have never needed to learn these until now and am asking if anyone can recommended some free learning material on these.
Thanks for your time.
Edit. Sorry for the edit I should have also point o...
Is there an equivilant in Python for PHPs call_user_func_array?
...
I'm trying to join three tables from a database in-order to display a users selected categories but I get the following error.
Warning: mysqli_error() expects exactly 1 parameter, 0 given in
I think I'm doing something wrong when I query my database.
Here is the code below.
// Query member data from the database and ready it for dis...
Hi,
I would like to create a caching system that will bypass some mechanisms in order to improve the performance.
I have some examples:
1-) I have a dynamic PHP page that is updated every hour. The page content is same for every user. So in this case I can either:
a) create an HTML page, and that page can be generated every hour. In ...
I asked a question earlier and a user stated that it looks like i'm oddly mixing the OO and procedural style usage of mysqli and that I should stick to either one or the other.
Can some one show me exactly what is wrong with my code and how my code should look like in OO and procedural form. I'm kind of curious now since the code I have...
I need some help with screen scraping a site (http://website.com).
Lets say I'm trying to get an image inside
But when I pull it down, it's path is relative ie "image_large/imageName.jpg" (I'm going to pull down this image daily as it changes daily. It always begins with "images_large/.
How can I go in and prepend the url website.com...
Hi Guys
I need some guidance around how to develop the app I'm working on.
It's basically a backend system to manage photos and slideshows (eg arrange photos in albums, decide which ones to publish, update names and captions etc)
I would like to avoid giving the source code to clients but would like to keep the actual photos and thumb...
Is there a common way of dealing with tags in databases?
I'm thinking of using tinytext with pipes.
I think adding another table and using IDs might make it more complicated for little gain.
What's your preferred way of doing this?
and what is the right way of doing queries in a table to find results matching multiple or single tags...
Let's say I have a user that entered 12 links into the database but when they are displayed I want to break up the links into groups of 3 and repeat the groups of three until all 12 kinks are displayed for example.
<div>
<p><a href="">Link 1</a></p>
<p><a href="">Link 2</a></p>
<p><a href="">Link 3</a></p>
</div>
Here is part of th...
I'm trying to sort data by different fields ascending and descending. But I have different mysql pdo statements for the 4 fields I have (8 queries total):
$stmt1 = $po->prepare("SELECT * FROM tabname WHERE categ=:categ ORDER BY field1 DESC");
$stmt2 = $po->prepare("SELECT * FROM tabname WHERE categ=:categ ORDER BY field1 ASC");
$stmt3 =...
Hello,
The variable below formats as "2009-11-05 22:51:26" when it is printed. How could I format it to "22:51 New York Time 5 Nov 2009 Thursday"? (I think the timestamp in my database is United States eastern time zone).
createddatetime TIMESTAMP DEFAULT CURRENT_TIMESTAMP
Thanks in advance,
John
...
I'm creating a online community for a soccer betting game available in my country. I've a pretty good idea how the whole system should work but I'm having some trouble figuring out the ideal database design and I need some help with it.
The usual work flow should be something like this:
Everyone is welcome to register as a member; eac...
This may be simple to some of you guys but im a novice coder. How do i make this foreach loop terminate after i loops. The number keeps resetting as it loops through another condition. There are multiple a's. About 100 so it i never gets up to 250.
$i = 0;
foreach ($a as $b) {
//do function
i++;
if (i == 250)
{
exit;...
Let's say I have 2 pdo statements that differ only in order (asc vs. desc)
$stmt1 = $po->prepare("SELECT * FROM tabname WHERE categ=:categ ORDER BY field1 DESC");
$stmt2 = $po->prepare("SELECT * FROM tabname WHERE categ=:categ ORDER BY field1 ASC");
Is there a way I can bind ASC/DESC dynamically so I can have only 1 stmt
$order = "AS...
I am attempting to make a registration-like page for a small forum. To register for an event, I simply want the users to click a 'link'. (It doesn't have to be a link, but I don't want it to look like a button, so fancy CSS is acceptable).
On this page there will be a limited number of openings per event. (Simple database query to popul...
I'm trying to display the following code only once while the rest of the code loops threw. How should my code look like and where should I put it. As of right now the bottom code will not display but if I put it in the loop it will display multiple times (not what I want).
//Display only once.
if (!empty($row['category']) && !empty($r...
I have a MySQL database where users can list books they've read, want to read etc. I'm trying to write a query to find the most common book that users have listed.
My current query is:
$result = mysql_query("SELECT title, COUNT(title) AS counttitle FROM books GROUP BY title ORDER BY counttitle DESC LIMIT 1");
echo "<p>The ...
im new to sessions but from what i see it complicated to apply <input> with them. can you please look at this code and tell me why its not working. i had it working earlier then it died on me. the function of the program is to fill out a form and have it verified for legit information using regular expressions, i just need help with get...
foreach ($a as $b)
{
do function
}
...
How do i make a Php script terminate after a fixed amount of time
...