Jump to content

can someone help me with some php


son.of.the.morning

Recommended Posts

Hey,

 

I want to selected the most recent update in my sql database, i am using this at the moment

 

$sql="SELECT * FROM $tbl_name WHERE id='6'";

$result=mysql_query($sql);

 

Which is just selecting the record that has the id "6"

 

any suggestions...?

Link to comment
https://forums.phpfreaks.com/topic/212074-can-someone-help-me-with-some-php/
Share on other sites

No the insert new record is on a totally different page. I just want to selected the post recently added record.

 

For example:    if I added a new record to the database and went on the news page  were i am trying to select a record it would show only the last record i inserted.

Do you understand me?

 

That worked like a charm, thanks allot man. I wonder if you can help me with a another php issue, i am going to be building a tutorial site and i want a search utility within it, how would i come about doing this?

Though my personal bias is speaking, I would say the method of implementing full-text search for a website that strikes the best balance between accessibility to a PHP programmer and performance is the Search_Lucene component of the Zend Framework:

 

http://framework.zend.com/manual/en/zend.search.lucene.overview.html

 

Using this, however, would require spending some time learning how to implement the framework overall.

 

If using a framework or external sever (like the original Apache Lucene) is not something you want to learn right now, the easiest option is to use Google Site Search:

 

http://www.google.com/sitesearch/

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.