Re: [PHP-DB] dynamic pages
look up HTTP_POST_VARS an related, it's used to retrieve the form data when globals are off. I would like to have the same page (test.php) have different text in it depending on a database entry. which is easy enough. but I want it to be on the fly. example list would be created on the fly depending on databse entries. which ever entry was picked (lets say STLT) it would open up my template test.php and it would but the STLT info on the page. Is there a way to do this without turning on Global_Variables which come standard off in php4.2.2 I'm using apache 2.0.39, PHP4.2.2, FreeBSD4.6, Mysql3.23.51 My database entries would be deparmentpageartical template stlt1body of page test.php aps 1body of page test.php srp 1body of page test2.php main 1body of page test.php the list would be created by a query that looks for all page 1 entries from there the main page would show up(default), but once you pick from the list it would show the database enteries for that department. |---|--- |main | |STLT | STLT was picked show STLT artical database entry |aps | this is are STLT page |srp | | | |---|--- |---|--- |main | |stlt | APS was picked show APS artical database entry |APS | this is are APS page |srp | | | |---|--- I assume that Gobal_Variables are off for a reason. Rolando -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php --__-__-__ eat pasta type fasta -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] number of files in a dir vs. performace
I'm using mysql to hold references to image files then served on my pages via PHP. I have typically a set of two files: thumb and a large original, on occasion there is also a variant inreasing the set to 3 per image currently I am holding all of the files in 1 directory since the DB can keep track of them, however their number has grown to over 400 at this point my issue is whether it would be worth it (performance wise) to split them into thumbs and works thus having 200+ files per directory as opposed to so many, I am expecting the number of images to double in the future. R --__-__-__ eat pasta type fasta -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] server performance
Not exactly a PHP question, but you guys will know, is there a significant performance difference in how long does it take a server to find files as the directories become more nested, eg. 1. file index.php uses images from directory DIR vs. 2. file index.php uses images from directory images/DIR vs. 3. file index.php uses images from directory files/images/DIR Thanks in advance, R --__-__-__ eat pasta type fasta -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Strange MySQL Query Problem
I already got some replies for this but it wasn't it, here is the problem: I have a simple form which queries the database based on 2 pop-up menu choices and keywords entered by the user, it passes on the variables as follows: pop-up1=choice1, pop-up2=choice2, textfield=user specified data the query is as follows $result = mysql_query(SELECT some_id, some_description, some_feature FROM '$pop-up1' WHERE some_description LIKE '%$texfield%' AND some_feature LIKE '%$pop-up2'); it tells me that column which equals to the $texfield does not exists, meaning that the query seems to be fed wrong? No idea here, $texfield and $pop-up2 are not requests for tables but matches in those tables a bit buffled I am, I've these queries before on larger web servers, this is the first time on my workstation and it does just that, simpler queries work fine... thanks in advance, R ps. the form is guarded against empty entries ps2. RedHat 7.3, Mysql 3.23.51, Apache 1.3+ wik PHP 4.2.1 configured for MySQL -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Strange MySQL Query Problem
I have a simple form which queries the database based on 2 pop-up menu choices and keywords entered by the user, it passes on the variables as follows: pop-up1=choice1, pop-up2=choice2, textfield=user specified data the query is as follows $result = mysql_query(SELECT some_id, some_description, some_feature FROM '$pop-up1' WHERE some_description LIKE '%$texfield%' AND some_feature LIKE '%$pop-up2'); it tells me that column which equals to the $texfield does not exists, a bit buffled I am, I've these queries before on larger web servers, this is the first time on my workstation and it does just that, simpler queries work fine... thanks in advance, R ps. the form is guarded against empty entries ps2. RedHat 7.3, Mysql 3.23.51, Apache 1.3+ wik PHP 4.2.1 configured for MySQL -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Efficien search queries
I have simple db wik names, links and short (less then 1000 chars) descriptions. I do offer a search (with the select like %variable% method) but it seems to be very dumb, on single phrases it goes fine on combined it it very bad. Is there a way (link, advice) to spicy it up a bit so the user can get more out of it each time. Thanks in advance. R --__-__-__ eat pasta type fasta -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Inserting a String Variable into mysql_query() returns Query was empty error
I am creating a string out of bunch of variables and an array and I need it to become a query which will make me a table. It looks like this when I echo it: CREATE TABLE How Are You (Reply1 VARCHAR(255), Reply2 VARCHAR(255), Reply3 VARCHAR(255), Reply4 VARCHAR(255), Reply5 VARCHAR(255), date DATE) and it appears in the code under the name $all_sections, however when I put into the mysql_query function like so: $sql = mysql_query($all_sections); it returns Query was empty error, any ideas? Thanks in Advance. R --__-__-__ eat pasta type fasta -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] Numeric value are coming in as halfs
I'm using PHP to read data from a file and dump it into an array, then I'mfeeding that array into mySQL transfer happens fine except that some the numeric values are halfed currenly I'm simply tweaking the output by going: (int) $player_data[16] = $player_data[16] * 2 / 10; the /10 is needed because it also adds a zero to the end (f*cking guy) this is the script: for ($i = 1; $i 34; $i++){ $order = fgets($fp, 100); $order_exploded = explode(=, $order); fwrite($this_fp, $order_exploded[1]); echo($order_exploded[1] . br); trim($order_exploded[1]); $player_data[$i] = $order_exploded[1]; the fwrite() part is just a remainder of old testing (acts as write confirm) the data comes in 'field=value' format hence explode and sh*t THanks in advance. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php