PDA

View Full Version : AWS database type thing...



incka
07-24-2004, 04:02 AM
Currently I have to create a seperate PHP file for each category I do, I want to make it like these sites below that appear to use a system where the URL typed in makes the PHP file display the correct node:

http://www.discountpowertools.net/cat/31
http://www.luggage-store.net/cat/sports/Basketball
http://www.homeimprover.info/products/552842/featured/


Can anyone help me? If you help me by MSN I can paypal $10.

Chris
07-24-2004, 09:13 AM
I have a database of browse nodes. I explained how I set up the database and I included the php code to parse browsenodes.com output into the database in a previous post.

incka
07-24-2004, 02:05 PM
I'll look for that. I like my sites to have as little files as possible, I'm doing a massive overall of them all converting html to php and cutting down on stupid overuse of files when I can use less. Including images and .htaccess one of my sites only has 5 files now. I'm also updating designs, as some of my sites look like they were designed by a five year old...

MarkB
07-24-2004, 02:26 PM
Or just use htaccess to point nice URLs to the proper URL...

incka
07-24-2004, 03:31 PM
I like to keep things as small as possible. I feel more like I control the website and the website doesn't control me then.

chromate
07-24-2004, 04:11 PM
I basically do the same as Chris, except, I don't bother with the database. I just have an array that stores the browse nodes and reference that.

AndyH
07-24-2004, 05:16 PM
Quick example on how to populate a table with the data from BrowseNode.com:



<?PHP

// Connects to the database
include("config.php");

//The file from BrowseNode.com
$file = "http://www.example.com/file.txt";
$lines = file($file);

$done=0;
foreach ($lines as $line_num => $line) {
list ($cat_name, $sub_of, $node) = split("\|",$line);

$query = "INSERT INTO `catagories` (`cat_name` ,`node` ,`sub_of_node`) VALUES ('$cat_name', '$node', '$sub_of')";
mysql_query($query);

$done++;
}
echo "Populated Number: $done";

?>

intelliot
07-24-2004, 05:30 PM
Hi incka, I talked to you on MSN but I guess you don't need anymore help?

incka
07-25-2004, 04:23 AM
I might need help still. My connection died last night :(

incka
07-25-2004, 11:41 AM
I can get the nodes into a database - It's echoing them in my php im having problems with.

In particular this bit:

$params = array(
'browse_node' => 173508,
'page' => $page,
'mode' => 'books',
'tag' => 'games2go-20',
'type' => 'heavy',
'sort' => '+reviewrank',
'devtag' => 'D2B58IDSY7XE6F'
);

It won't let me put the php database echo of echo $row['node']; in

tomek
07-25-2004, 01:37 PM
I don't know about that particular node but not every browse node works via aws...

incka
07-25-2004, 01:51 PM
I know that. I can get it working normally, just not using my database thing... I'm not good with php.

tomek
07-25-2004, 02:49 PM
>> It won't let me put the php database echo of echo $row['node']; in

you mean $row['node'] is has no value?
are you sure your sql-query is correct?

if you post your query here we can check its syntax...

$sql = '...';
echo $sql;

-> copy & paste here

intelliot
07-25-2004, 03:09 PM
run an sql query to get the rows and then echo the fields you want.

incka
07-26-2004, 12:53 AM
I'm not understanding.

kdb003
08-01-2004, 12:09 AM
just post all of your code so we can see what the problem is

Anat
08-01-2004, 07:13 AM
I have a database of browse nodes. I explained how I set up the database and I included the php code to parse browsenodes.com output into the database in a previous post.

What's browsenodes.com? I can't find a website by that name.

intelliot
08-01-2004, 01:32 PM
it provides amazon browse nodes. it seems to be down currently but i had seen it earlier.