Hello,
The code below works great. It creates a table that shows the 25 most recently added tables to a MySQL database called "sitefeather."
Each one of these tables has the following structure:
Code: id INT(11) NOT NULL auto_increment, site VARCHAR(1000) NOT NULL, action1 BIGINT(9) NOT NULL, action2 BIGINT(9) NOT NULL, createddatetime TIMESTAMP DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY(id), UNIQUE (site)
I would like to echo a list of "site" and "CURRENT_TIMESTAMP" for the 25 most recently added rows, regardless of which table they are in. This may be tricky since the number of tables is variable. Someone advised me that I would have to use a query involving INFORMATION_SCHEMA.TABLES. How can I do this?
Thanks in advance,
John
Code: echo "<table class="samples">";
$index = mysql_query("select TABLE_NAME from INFORMATION_SCHEMA.TABLES where TABLE_SCHEMA='sitefeather' order by CREATE_TIME desc limit 25");
while ($row = mysql_fetch_array($index))
{
echo '<tr><td><a href="sitesearch.php?find='.urlencode($row['TABLE_NAME']).'&searching=yes&search=search">'.$row['TABLE_NAME'].'</a></td></tr>';
}
echo "</table>";
Slow data retrieval which requires improvement..please help
I am working on a Help Desk Ticketing system and have a page called MY TICKETS which shows all tickets in grids. the problem is that the number of records are around 30 to 40 but there is a lag
Retreiving objects from Sessions
Hi all,I am getting really frustrated with storing and retreiving objects from a session. But it may be because of my lack of knowledge in sessions First some system specs:OS - Vista Home
ASP.NET Validation Event Cycle
Hi,I have asp button as follow:<asp:Button id="btnTest" OnClientClick="SetSomething(true);" ValidationGroup="A" OnClick="btnTest_Click" />The event flow is like this,1. OnClientClick Event is
Typedef struct vs just struct
Anyone know the rationale for using typedef for structs when a struct is itself a typedef? I have seen this in just about every book I have ever read, never with any explanation, yet I know from
Preg_match unknown modifyer
Hello,Im trying to write a little script for my forums i need to get the reply from my forums. Im trying thisCode: $pattern = '/<span
SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is significal for e.g Plan cost is 112 million where as budget is 136 million. In this situation what will
Reditecting pages based on logic
Newbie here, apologies in advance!I am trying to use the header function to forward one of any number of locations (taken from a db) based on the value of a response param:Quote<?php include
Problem in String replace program's output
Hi all,
php global variable
how can we create global variable so we can use its value in any form.. Please give example to
Need help: how to catch acess of undefined class properties
Hello. I am learning OO with PHP and have hit a problem.Some code runs as perfectly valid code, where i would like PHP to issue a warning / error.I guess this is because of the loose typing of PHP,