RE: [PHP-DB] PHP-Extension for Cego database
GOOD afternon,to alll I am new to php,mysql i want to create user login account in a page please help me ,,, _ Drag n’ drop—Get easy photo sharing with Windows Live™ Photos. http://www.microsoft.com/windows/windowslive/products/photos.aspx
[PHP-DB] Fix your corrupted tables / ibdata1 problem
Dear everyone, I just love list and I think I should share this information on how to fix MySQL tables that are in use and according to the articles: http://articles.techrepublic.com.com/5100-10878_11-5193721.html and http://tgrove.com/2007/12/02/innodb-operating-system-error-number-13-in-a-file-operation/ - First you should goto the corrupt databse folder in data
[PHP-DB] Fix your corrupted tables / ibdata1 problem
Dear everyone, I just love list and I think I should share this information on how to fix MySQL tables that are in use and according to the articles: http://articles.techrepublic.com.com/5100-10878_11-5193721.html and http://tgrove.com/2007/12/02/innodb-operating-system-error-number-13-in-a-file-operation/ - First you should goto the corrupt databse folder in data - either fix all tables or if you know the table name: # myisamchk -r *.MYI # myisamchk -r /path/to/table.MYI - The, look for these lines, uncomment and change the paths innodb_data_home_dir = /usr/local/mysql/data/ innodb_data_file_path = ibdata1:10M:autoextend innodb_log_group_home_dir = /var/db/mysql/ innodb_log_arch_dir = /usr/local/mysql/data/ - And now fix your permissions on the DATA directory. #chown -R mysql:mysql /usr/local/mysql - or if u'd like more specific solution and when u get error number 13 on starting up the Engine, then u must type this command: # chown mysql:mysql /usr/local/mysql/ibdata1 And u're saved :)
Re: [PHP-DB] Problem with rss-feed generation
I support Neil on this point! But anyway this list has answered many other aspects, so why not some XML? Ruprecht you might like FeedCreator latest stable from here http://www.bitfolge.de/rsscreator it just doesn't generate ATOM 1.0, but all other formats will be readable atleast by IE and Firefox. Best Regards. - Shape Yahoo! in your own image. Join our Network Research Panel today!
[PHP-DB] Compare a given value with multiple values field
Hi My Best List, I have a field in a table contains 3,31,11,10 (let say tablefield1) and I have a given value which I need to check if it exists in that list. I've tried: SELECT * FROM table WHERE 3 IN ( tablefield1 ); Any ideas? - Get your email and more, right on the new Yahoo.com
Re: [PHP-DB] Compare a given value with multiple values field
I guess this is this closest, but apparently in this case if the 3 at the beginning doesn't exact, and even using LIKE '%3,%' (removing the first comma) would match an entry like 33, ! I need a better solution, does mysql have something similar to explode() in PHP? if it does, then how to apply it in my situation? of course it done using PHP but that's not feasible at all. Tom Atkinson [EMAIL PROTECTED] wrote: If you have the literal string 3,31,11,10 in a field in your table then you can 'search' for numbers in the string like this: SELECT * FROM table WHERE CONCAT(',', tablefield1, ',') LIKE '%,3,%' I don't know if it's the best way of doing it but it works for me. Natalie Leotta wrote: I'm not sure I understand your question, but my interpretation would be solved like this select * from table where variable in (select id from tablefield1) I hope this helps you!! Natalie On 9/16/06, Hassan wrote: Hi My Best List, I have a field in a table contains 3,31,11,10 (let say tablefield1) and I have a given value which I need to check if it exists in that list. I've tried: SELECT * FROM table WHERE 3 IN ( tablefield1 ); Any ideas? - Get your email and more, right on the new Yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php - Stay in the know. Pulse on the new Yahoo.com. Check it out.
[PHP-DB] Force Multiviews in vhost.conf of PLESK to allow search-engine friendly URLs
Hi everyone, I know it's pretty off subject but I just couldn't find anywhere on the Web, and it's almost PHP related. I have PLESK 7 Reloaded on my machine and Apache 2 with PHP 4.3.7 I've changed my /home/httpd/vhosts/mydomain.com/conf/vhost.conf to contain Only this statement: Options +Multiviews This only allow me call PHP files without the extension (.php) but it doesn't allow anything else like mydomain.com/folder/phpfile/12 , Yet it's working perfectly on localhost I have tried putting AcceptPathInfo On directive with the above mentioned but still the same. Any ideas other than using mod_rewrite? This is my favorite mailing list and I got the feeling that it won't let me down. Thank you in advance :) - Do you Yahoo!? With a free 1 GB, there's more in store with Yahoo! Mail.
[PHP-DB] mysqldump but exclude one table
Hello everyone, I've a reader for sometime now, the best db list ever got into. Well, I'd like to mysqldump a certain database, but with skipping one table, is it possible? Thanx - Yahoo! Mail Stay connected, organized, and protected. Take the tour
[PHP-DB] php5 busts php4 code
Hi, I am running: apache 2.0.52 MySQL 4.1.7 php 4.3.9 I have a program for user data entry, retrieval, editing and updating. Works fine. When I updated php to 5.0.3: Data entry works fine (including login with password) but data requested does not populate populate form anymore. I have all error reporting turned on and nothing comes back/ Data entry integrity was checked with seperate application = OK/ Any hints? I can post code if asked. Thanks, Hassan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] php5 busts php4 code
Thank you Martin Richard, First Richard's question: I am using the preconfigured binary install package for Mac OS X 10.3.7 from Marc Liyanage at: http://www.entropy.ch/ It has support for mysql compiled into it with the mysql client library ver. 4.1.3beta as reported by into.php. It does work in the POST direction because information entered into html forms is written to the proper database-tables-columns. I checked this with a seperate mysql gui application named MySQL4X Manager for the Mac OS X platform. The POST data arrived just fine. As to Martin's comments and links, I did check out the php documentation concerning migrating code from ver. 4 - ver 5. I thought I had enabled all backwards compatibility pnp.ini directives. I again checked that the php.ini file was correctly found by checking the info.php. The thing I'm guessing (I am a php amateur) is that it has something to do with paths a.k.a '_SERVER'in conjuction with argc and argv arguements. I have not exhaustively tested possible changes The code is a tweaked version of a Dreamweaver MX 2004 (out-of-the-box)routine. Again the code worked fine under php 4.3.9. the GET request look like this: ?php $colname_members_mbr = 1; $colname_profile_pfl = 1; $colname_lifetyle_stl = 1; if (isset($_GET['username_mbr'])) { $colname_members_mbr = (get_magic_quotes_gpc()) ? $_GET['username_mbr'] : addslashes($_GET['username_mbr']); } if (isset($_GET['username_pfl'])) { $colname_profile_pfl = (get_magic_quotes_gpc()) ? $_GET['username_pfl'] : addslashes($_GET['username_pfl']); } if (isset($_GET['username_stl'])) { $colname_lifestyle_stl = (get_magic_quotes_gpc()) ? $_GET['username_stl'] : addslashes($_GET['username_stl']); } mysql_select_db($database_roommatesat8, $roommatesat8); $query_members_mbr = sprintf(SELECT * FROM members_mbr WHERE username_mbr = '{$_SESSION['MM_Username']}', $colname_members_mbr); $members_mbr = mysql_query($query_members_mbr, $roommatesat8) or die(mysql_error()); $row_members_mbr = mysql_fetch_assoc($members_mbr); $totalRows_members_mbr = mysql_num_rows($members_mbr); mysql_select_db($database_roommatesat8, $roommatesat8); $query_profile_pfl = sprintf(SELECT * FROM profile_pfl WHERE username_pfl = '{$_SESSION['MM_Username']}', $colname_profile_pfl); $profile_pfl = mysql_query($query_profile_pfl, $roommatesat8) or die(mysql_error()); $row_profile_pfl = mysql_fetch_assoc($profile_pfl); $totalRows_profile_pfl = mysql_num_rows($profile_pfl); mysql_select_db($database_roommatesat8, $roommatesat8); $query_lifestyle_stl = sprintf(SELECT * FROM lifestyle_stl WHERE username_stl = '{$_SESSION['MM_Username']}', $colname_lifetyle_stl); $lifestyle_stl = mysql_query($query_lifestyle_stl, $roommatesat8) or die(mysql_error()); $row_lifestyle_stl = mysql_fetch_assoc($lifestyle_stl); $totalRows_lifestyle_stl = mysql_num_rows($lifestyle_stl); $sessUsername = $_SESSION['MM_Username']; $_SESSION['sessName']=$sessUsername; ? If anyone can point me in the right direction I would appreciate it. Hassan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP-DB] order by group by...
hi, i am trying to build a message board in php with mysql as back end; what i want to do is to query the database in a certain way that the result is returned in the correct order for php to display the discussion thread properly here is my table structure: mysql show fields from posts - ; +-+-+--+-+-++ | Field | Type | Null | Key | Default | Extra | +-+-+--+-+-++ | msgid | bigint(20) unsigned | | PRI | NULL | auto_increment | | dateadded | timestamp(14) | YES | | NULL | | | subject | mediumblob | | | | | | body | longblob | YES | | NULL | | | replytopost | bigint(20) unsigned | YES | | 0 | | | aposition | tinyint(3) unsigned | YES | | 0 | | | thrid | bigint(20) unsigned | | MUL | 0 | | | usrid | bigint(20) unsigned | | MUL | 0 | | | username | varchar(50) | | | | | +-+-+--+-+-++ 9 rows in set (0.00 sec) the query should look like : select * from posts where thrid = 'the id of the thread' order by.(this is the part i couldn't figure out); the position of a single message into the tree is determined by the following criteria: dateadded : the date in which it was added replytopost: the post to which it belongs, if none then 0 is assigned aposition: the absolute position of the message (horizontal) a combination of these columns in an order by clause should (in theory) build the tree correctly please advise me if i am doing something wrong here, i have tried many combinations without success regards; hassan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Re: Search Results - Next 10 records
hi ...and to be able to know the exact number of pages do $result = mysql_query(select count(*)); $nb_pages = $result/$nb_records_per_page; et voila! add this to marcus's suggestion and you have a full paging script, if you want some inspiration check out http://phpclasses.upperdesign.com i believe they have a class that does exactly that; regards At 14:02 03/09/01, Marcus Tobias wrote: Hi Dennis! You can add the parameter LIMIT to your SQL query. Syntax: LIMIT $start_record,$record_count Example: $query_string = select * from $table where keywords like '%$keyword%' limit 5,3; This will return 3 records started with the 5. found record. The startrecord has to increase on next page. Store the current startrecord in the form and send it to the next page. bye Marcus Dennis [EMAIL PROTECTED] schrieb im Newsbeitrag [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Trying to figure out how to limit search results to say 10 records and produce a button to show the next 10. Do you use PHP to do the logic, or should I make another table column for a temporary count? This is what I'm up to so far... Thanks in advance function show_all($table, $keyword=0)// initialize to zero { global $start_record; if ( !isset( $start_record ) ) $start_record = 0; $query_string = select * from $table where keywords like '%$keyword%'; $query_string = select * from $table where keywords like '%$keyword%' limit $start_record,10; $entire_table = mysql_query($query_string); $count = 0; print(TABLE BORDER=1 width=700\n); while ($cols_rows = mysql_fetch_array($entire_table)) { $count++; if ($count 4){ print(tr); print(td bgcolor=azure); print(font size=3); print ($cols_rows['num']); print(/tdtd bgcolor=azure); print(font size=2); print ($cols_rows['site_name']); print(/tdtd bgcolor=azure); print(font size=2); print ($cols_rows['keywords']); print(/tdtd bgcolor=azure); print(font size=2); print ($cols_rows['url']); print(P/td); } if ($count 3){ print(tr); print(td bgcolor=silver); print(font size=3); print ($cols_rows['num']); print(/tdtd bgcolor=silver); print(font size=2); print ($cols_rows['site_name']); print(/tdtd bgcolor=silver); print(font size=2); print ($cols_rows['keywords']); print(/tdtd bgcolor=silver); print(font size=2); print ($cols_rows['url']); print(/td); $count++; } } print (FORM METHOD='POST' ACTION='search1.php'); print(INPUT TYPE='text' NAME='start_record' VALUE='$start_record+10'); print (INPUT TYPE='submit' VALUE='Next'/FORM); print $count; print(/TABLE\n); } ? -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP-DB] order by group by...
hi, i am trying to build a message board in php with mysql as back end; what i want to do is to query the database in a certain way that the result is returned in the correct order for php to display the discussion thread properly here is my table structure: mysql show fields from posts - ; +-+-+--+-+-++ | Field | Type | Null | Key | Default | Extra | +-+-+--+-+-++ | msgid | bigint(20) unsigned | | PRI | NULL | auto_increment | | dateadded | timestamp(14) | YES | | NULL | | | subject | mediumblob | | | | | | body | longblob | YES | | NULL | | | replytopost | bigint(20) unsigned | YES | | 0 | | | aposition | tinyint(3) unsigned | YES | | 0 | | | thrid | bigint(20) unsigned | | MUL | 0 | | | usrid | bigint(20) unsigned | | MUL | 0 | | | username | varchar(50) | | | | | +-+-+--+-+-++ 9 rows in set (0.00 sec) the query should look like : select * from posts where thrid = 'the id of the thread' order by.(this is the part i couldn't figure out); the position of a single message into the tree is determined by the following criteria: dateadded : the date in which it was added replytopost: the post to which it belongs, if none then 0 is assigned aposition: the absolute position of the message (horizontal) a combination of these columns in an order by clause should (in theory) build the tree correctly please advise me if i am doing something wrong here, i have tried many combinations without success regards; hassan -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] Getting info from Cookie
$http_cookie_vars['name_of_cookie'] At 09:57 15/08/01, Cato Larsen wrote: Hi! How can you extract a certain form of info from a Cookie? Im my case the cookie name is crispy. It has been stored with a session id and a charnick. How do I extract the charnick and use it in the page as $charnick or similar? Best Regards Cato Larsen -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP-DB] True and Flase in mysql !!
you could also use a char(0) field in which case you can only have two possible records: NULL and ' ' (empty string) regards 09/05/01 22:42:04, Zak Greant [EMAIL PROTECTED] wrote: Use an enum field. --zak - Original Message - From: DesClub.com [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, May 10, 2001 2:43 AM Subject: [PHP-DB] True and Flase in mysql !! hi all .. What is the best way to create True\Flase field in mysql ?? - http://deslcub.com/phpLinkat/ DesClub.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]