[PHP-DB] How to use mysqli with php5.6

2016-06-12 Thread stevens
iated! stevens -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP-DB] printable pdf

2009-02-04 Thread Micah Stevens
It's not actively maintained, but it's easy to use and works great: http://www.ros.co.nz/pdf/ I like it better due to it's API than the other stuff I've tried, although it's lacking in some functionality. On 02/03/2009 09:04 PM, Ron wrote: Hi All, I'm creating a billing system wherein a user

Re: [PHP-DB] mysql_select_db

2008-10-21 Thread Micah Stevens
Try it on the command line from the webserver: mysql -h hostname -u Stan -p Password See if that connect works. -Micah On 10/21/2008 04:26 AM, Stan wrote: Nope ... that wasn't it. The mysql_connect() works. It's the mysql_select_db() that's failing. -- PHP Database Mailing List

Re: [PHP-DB] mysql_select_db

2008-10-21 Thread Micah Stevens
prompt. And the mysql_connect() statement in my code does not die. But the mysql_select_db() statement in my code does die. Micah Stevens [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Try it on the command line from the webserver: mysql -h hostname -u Stan -p Password See

Re: [PHP-DB] decimal point

2007-12-19 Thread Micah Stevens
, 16 Dec 2007 12:55:01 -0500 To: Micah Stevens [EMAIL PROTECTED] Cc: php-db@lists.php.net Subject: Re: [PHP-DB] decimal point Ok. I have this resolved. One more question about this --- is there any way I may keep the 2 decimal places when I use math to manipulate the variable --- $rate_plan_rate

Re: [PHP-DB] decimal point

2007-12-15 Thread Micah Stevens
What's your insert statement? On 12/15/2007 05:11 PM, Ron Piggott wrote: How do I get the decimal point back when I am retrieving from a column that is set up as: rate decimal(4,2) Example: Right now it is giving me 800 instead of 8.00 Ron -- PHP Database Mailing List

Re: [PHP-DB] decimal point

2007-12-15 Thread Micah Stevens
at 18:18 -0800, Micah Stevens wrote: What's your insert statement? On 12/15/2007 05:11 PM, Ron Piggott wrote: How do I get the decimal point back when I am retrieving from a column that is set up as: rate decimal(4,2) Example: Right now it is giving me 800 instead of 8.00 Ron

Re: [PHP-DB] What could be the right approach to get this data

2007-09-26 Thread Micah Stevens
Sessions use cookie unless you force the URL session ID. Once you do that, your options are pretty limited. You must pass some sort of identifier from page load to page load to track a session. This can either be via cookie (a preferred method) or through GET or POST variables. There is no

Re: [PHP-DB] Include function across servers

2007-04-03 Thread Micah Stevens
No. That would be to access the code. Include grabs an entire file. Perhaps you should look into Ajax techniques. -Micah On 04/02/2007 04:06 PM, ioannes wrote: I have a particular business application so just returning html is OK, the output is the useful bit in this case. I understand from

Re: [PHP-DB] Include function across servers

2007-04-02 Thread Micah Stevens
I'm not totally clear on what you're asking, so here's two options: If you use the include() function, you're pulling the code from the external server and running on the local server. If you're running an HTTP call, say via an Ajax routine for example, the code runs on the external server.

Re: [PHP-DB] dst

2007-03-17 Thread Micah Stevens
Did you restart MySQL? On 03/16/2007 02:22 PM, Ron Croonenberg wrote: Hi quick question (off topic a bit) MySQL seems to be not running on DST while the machine it is on is. any ideas ? if I use a mysql_query(select now(), connection); it looks like it is an hour earlier then the system

Re: [PHP-DB] Re: do not display dublicated entries

2007-03-14 Thread Micah Stevens
I thought about this some more, and my last reply wouldn't work if you wanted data besides the IP and date. A better answer is to use a self-join like this: select t1.* from tracker t1 left join tracker t2 on t2.date t1.date and t2.ip = t1.ip where t2.date is null That should get you what

Re: [PHP-DB] Caching query results in html pages

2007-03-13 Thread Micah Stevens
This may work, although I just made it up. I can see already that you'd have some problems with multiple scripts running at once. If a script opens the cache, then a second script saves new cache information before the first script saves it's data, the first script would overwrite the second

Re: [PHP-DB] Search

2007-03-12 Thread Micah Stevens
There's so many correct answers to your question that I don't really want to broach the subject. There's enough to that question that could fill several volumes. Take a look at the FULLTEXT search functionality of MySQL just for a taste of what goes into such things. This is likely not your

Re: [PHP-DB] auto_increment command

2007-03-11 Thread Micah Stevens
Actually you can. As Bastien pointed out: ALTER TABLE tbl AUTO_INCREMENT = 1; This may screw with your indexes though, if you have a primary indexed, or unique indexed row, and you set this to 1, mysql MAY try and insert conflicting values. I've never done this so I have no idea how this is

Re: [PHP-DB] Storing 4KB jpeg images on hospital web server

2007-03-08 Thread Micah Stevens
On 03/08/2007 01:35 AM, Chetan Graham wrote: Back to the Hospital website. Now the Web Boss wants to put the images in the DB. I do feel the webserver folders would simply and well. However, we do what the boss says. I'm with Bastien on this one, I've stored images in a database in the

Re: [PHP-DB] PHP_AUTH_USER .htaccess

2007-03-06 Thread Micah Stevens
This function doesn't work if you're using the CGI version of PHP. Check for that - it may be responsible. -Micah On 03/06/2007 12:02 AM, Mike van Hoof wrote: Hello, I've got a really strange problem, and hope this is the right list to post to. I got a website with a login, which uses a

Re: [PHP-DB] array field type

2007-03-06 Thread Micah Stevens
Wrong! Take a look at the SET datatype http://dev.mysql.com/doc/refman/4.1/en/set.html. This allows you to have an array of values in a single field, and the user can select any number of them. Sort of, but not really: This is a really specialized keyword, and depends on binary mapping

Re: [PHP-DB] array field type

2007-03-04 Thread Micah Stevens
Not a single field, but there's several methods of storing trees of information, which is what an array is. Here's one: Nested Array storage table: ArrayID (int, autonumber) keyname (text) parent (int) data (bigtext or whatever would be appropriate for the data you're storing) For an array

Re: [PHP-DB] Mysql autentication problem

2007-03-03 Thread Micah Stevens
)..not in real-life server.. thx for your repair on my missuderstanding - Original Message - *From:* Micah Stevens mailto:[EMAIL PROTECTED] *To:* bedul mailto:[EMAIL PROTECTED] *Cc:* php-db@lists.php.net mailto:php-db@lists.php.net *Sent:* Saturday, March 03, 2007 1:48 PM

Re: [PHP-DB] recursion in php and mysql

2007-03-02 Thread Micah Stevens
, $connection); But I have the impression that $result now isn't correct anymore ? the mysql_fetch_array() is the only function (so far) that complains ? thanks for your earlier very quick response, Ron Micah Stevens [EMAIL PROTECTED] 03/02/07 12:04 AM Yep, just put the connect

Re: [PHP-DB] Mysql autentication problem

2007-03-02 Thread Micah Stevens
Did you give the user permissions to use the database in question? Here's my sequence of actions: . 1) Create DB if it doesn't exist 2) Create the user w/password 3) Give the user permission to use the database. 4) Flush privileges to update the server. 5) login and enjoy. -Micah Roberto F

Re: [PHP-DB] recursion in php and mysql

2007-03-02 Thread Micah Stevens
Classes are overrated. :) Bastien Koert wrote: you could make the connection variable global, but the best bet here is to use a class and create a db object that your functions could call Bastien From: Ron Croonenberg [EMAIL PROTECTED] To: php-db@lists.php.net Subject: [PHP-DB] recursion

Re: [PHP-DB] auto upload

2007-03-02 Thread Micah Stevens
I think I remember seeing scheduled FTP transfer capability with a couple of backup programs that exist. I uninstalled the one I used, and I don't remember the name, but it worked well enough. Might be worth a google if you don't want to mess with non-gui stuff. (although, console work is

Re: [PHP-DB] Mysql autentication problem

2007-03-02 Thread Micah Stevens
to do the step 4. But the step 5 really does not work... only on the shell or when I remove the password from the user... Roberto Micah Stevens escreveu: Did you give the user permissions to use the database in question? Here's my sequence of actions: . 1) Create DB if it doesn't exist 2

Re: [PHP-DB] Mysql autentication problem

2007-03-02 Thread Micah Stevens
Reloading the grant tables should happen almost immediately unless you have an extremely large set of users, very little memory, or a very slow computer. On 03/02/2007 06:17 PM, bedul wrote: - Original Message - From: Micah Stevens [EMAIL PROTECTED] To: Roberto F Tavares Neto [EMAIL

Re: [PHP-DB] recursion in php and mysql

2007-03-01 Thread Micah Stevens
Yep, just put the connect function outside your recursive loop. You can then access the connection that is returned by the connect function by making it global, or passing it by reference by the recursive function. In other words: $connection = mysql_connect(); mysql_select_db($database,

Re: [PHP-DB] A good PHP Ajax tutorial

2007-02-26 Thread Micah Stevens
I've used Xajax library with PHP and it's very nice and easy to use. It's high-level, so if you want to learn the nuts and bolts, it's not a good place to start, but if you just want to make something work, it's great. http://www.xajaxproject.org/ On 02/25/2007 08:37 PM, Peter Beckman wrote:

Re: [PHP-DB] upgrade MySQL 4.1 to 5.0

2007-02-26 Thread Micah Stevens
Read the docs: http://dev.mysql.com/doc/refman/5.0/en/upgrade.html On 02/26/2007 01:31 PM, [EMAIL PROTECTED] wrote: Dear All, I want to upgrade database MySQL 4.1 to 5.0. What's will effects my PHP 5.0.4 script if I do that? Thanks Regards, NUR ANITA ADMAN IT System Analyst PT.

Re: [PHP-DB] SQL Query - Using variable from another SQL Query

2007-02-12 Thread Micah Stevens
This is a join - Read up on them, they're very useful and don't require the overhead of a sub-query. SELECT egw_cal.* FROM egw_cal_dates LEFT JOIN egw_cal using (cal_id) where egw_cal_dates.cal_start $tstamp AND egw_cal.cal_category = '501' -Micah On 02/12/2007

Re: [PHP-DB] Search witin text.

2007-02-10 Thread Micah Stevens
Send your query out on the list. That would give us something to work on. This should be very easy.. select * from tablename where column like '%$search%' or something of that nature. What are you doing? -Micah On 02/10/2007 08:49 PM, Chris Carter wrote: Hi, I have to send results to the

Re: [PHP-DB] indexing error - key length not specified

2007-02-09 Thread Micah Stevens
You can't use that column type as an index because it's variable length. Make it a varchar or something that's definite to index it. -Micah On 02/09/2007 03:56 PM, John Pillion wrote: I am trying to set an index on a field in my table, but am getting the following error: BLOB column

Re: [PHP-DB] indexing error - key length not specified

2007-02-09 Thread Micah Stevens
to use that wouldn't be variable length, but be able to store strings/values of that size? Thanks! John -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Friday, February 09, 2007 6:29 PM To: John Pillion Cc: php-db@lists.php.net Subject: Re: [PHP-DB] indexing

Re: [PHP-DB] MYSQL REGEXP question

2007-01-10 Thread Micah Stevens
, because there is a b in there which is not bv. Mike Medusa, Media Usage Advice B.V. Science Park Eindhoven 5216 5692 EG SON tel: 040-24 57 024 fax: 040-29 63 567 url: www.medusa.nl mail: [EMAIL PROTECTED] Uw bedrijf voor Multimedia op Maat Micah Stevens schreef: Your code states: Match

Re: [PHP-DB] MYSQL REGEXP question

2007-01-09 Thread Micah Stevens
Your code states: Match: one of the following letters: -,b,|,^,b negative look ahead one of these: -,v,$,|,v Which isn't what you're looking for. Remember the negating '^' only works at the start of a [] list. And '$' only means line-end if it's outside [], inside it stands for the '$'

Re: [PHP-DB] Distinct Partial Matches: RegExp

2006-08-30 Thread Micah Stevens
Select DISTINCT area from table like '$searchterms%'; In SQL, you can use the 'LIKE' keyword along with the '%' and '_' wildcards.. '_' is one character, '%' is any number of chars. -Micah Kevin Murphy wrote: This might be really easy, but I'm just not sure how to write this query and my

Re: [PHP-DB] Distinct Partial Matches: RegExp

2006-08-30 Thread Micah Stevens
-dog animal-cat animal-bird --Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On Aug 30, 2006, at 4:34 PM, Micah Stevens wrote: Select DISTINCT area from table like '$searchterms%'; In SQL, you can use the 'LIKE' keyword

Re: [PHP-DB] Distinct Partial Matches: RegExp

2006-08-30 Thread Micah Stevens
the complete list of items that are distinct, minus the last number after the last hyphen. animal-dog animal-cat animal-bird -- Kevin Murphy Webmaster: Information and Marketing Services Western Nevada Community College www.wncc.edu 775-445-3326 On Aug 30, 2006, at 4:34 PM, Micah Stevens wrote: Select

Re: [PHP-DB] Submitting form from a href

2006-07-14 Thread Micah Stevens
A little javascript would do it.. like so: a href=Javascript: getElementById('letterpressed').value = 'A'; getElementById('thisform').submit; void 0;A/a !-- Repeat for each letter -- form action=target.php id=thisform input type=hidden id=letterpressed name=letterpressed value= input

Re: [PHP-DB] Generating forms and form elements

2006-06-20 Thread Micah Stevens
Hi Mark, No problem! There as always are many ways to accomplish this, and this sounds like this will be largely an exercise in Javascript, but on the PHP/SQL side you'll just need to design a table where rows correspond to information that pertains to the whole form (username or ID, title,

Re: [PHP-DB] Generating forms and form elements

2006-06-20 Thread Micah Stevens
Stut wrote: Micah Stevens wrote: Stut wrote: Bastien Koert wrote: Not commenting on the appropriateness or security of the eval function. Merely offering a possible path. It is up to the OP to decide if that solution is the correct one. I would accept that if you'd mentioned, or at least

Re: [PHP-DB] Linux Commands

2006-06-05 Thread Micah Stevens
? (reaching...) or is this just OT... On 6/3/06, Micah Stevens [EMAIL PROTECTED] wrote: http://us3.php.net/exec I thought this was a database list? -Micah Manoj Singh wrote: Hello All, Is it possible to run the Linux Commands through php functions or code? If anyone knows, please help me

Re: [PHP-DB] Linux Commands

2006-06-03 Thread Micah Stevens
http://us3.php.net/exec I thought this was a database list? -Micah Manoj Singh wrote: Hello All, Is it possible to run the Linux Commands through php functions or code? If anyone knows, please help me out. Regards Manoj !DSPAM:44813dab14511796716657! -- PHP Database Mailing List

Re: [PHP-DB] Dynamic DataBinding in Form

2006-04-30 Thread Micah Stevens
Not quite sure what you're asking, but I think you mean, you want to automatically fill customer with the concat'd values of FName and LName.. You can do this with PHP, but only once the form is submitted (remember, PHP is server side) if you want to do it in the browser in front of the user,

Re: [PHP-DB] flash/php problem

2006-03-11 Thread Micah Stevens
On Friday 10 March 2006 6:24 pm, Anthony Lee wrote: Actually, I don't see why either method would work: The SWF is in a static HTML page. It requests an mp3, and loads it without having to refresh. So it needs an mp3 returned, not another SWF. Updating the DB from the SWF call sounds cool,

Re: [PHP-DB] Excel to CSV

2006-03-11 Thread Micah Stevens
I've never used it, but: http://sourceforge.net/projects/phpexcelreader/ -Micah On Saturday 11 March 2006 5:53 am, [EMAIL PROTECTED] wrote: The other response is half correct.. I havn't seen anything to read data from Excel with PHP (although it's technically possible, just kind of

Re: [PHP-DB] unescape a string

2006-03-11 Thread Micah Stevens
On Saturday 11 March 2006 6:11 am, Ludvig Ericson wrote: http://uk2.php.net/stripslashes This would partially unescape it, but mysql_escape_string does more than just add slashes to a string. -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP-DB] Passwords

2006-03-10 Thread Micah Stevens
On Friday 10 March 2006 7:09 am, Michael Crute wrote: On 3/10/06, Dusty Bin [EMAIL PROTECTED] wrote: One thing to remember, is that the password function is MySQL's way of storing passwords for MySQL use, and that may change from one release of MySQL to another. This happened very

Re: [PHP-DB] flash/php problem

2006-03-09 Thread Micah Stevens
Actually, I don't see why either method would work: 1) Call php, which updates, then calls swf. or 2) Call swf, which calls php to make update. No difference, both ways the job gets done.. What's the AMFPHP deal? I'll have to take a look at that.. -Micah On Wednesday 08 March 2006 11:23

Re: [PHP-DB] flash/php problem

2006-03-09 Thread Micah Stevens
Or rather, 'wouldn't work'.. my negatives are always screwey before 8.. On Thursday 09 March 2006 7:07 am, Micah Stevens wrote: Actually, I don't see why either method would work: 1) Call php, which updates, then calls swf. or 2) Call swf, which calls php to make update. No difference

Re: [PHP-DB] flash/php problem

2006-03-08 Thread Micah Stevens
Just an update to the DB on each swf load is what it seems he wants. On Wednesday 08 March 2006 7:13 pm, Anthony Lee wrote: This question isn't really a PHP-DB thang is it? Anyway, it sounds like you have a lot of swfs on the page. One for each song, is that right? In that case your best

Re: [PHP-DB] X Tiger 10.4.5 + phpBB2 + MySQL 5 + Can't Connect Issue!

2006-03-06 Thread Micah Stevens
Is there really a .sock file where you're telling php there is? MySQL can put the socket file anywhere you want depending on it's configuration. /etc/my.cnf should specify this. -Micah On Monday 06 March 2006 9:08 am, m i l e s wrote: Hi, Im getting the following: Warning:

Re: [PHP-DB] Help needed creating a social network

2006-03-06 Thread Micah Stevens
CREATE TABLE `users` (userID int(11) not null auto_increment, primary key(userID), name tinytext not null, email tinytext not null); CREATE TABLE `links` (userID int(11), key (userID), friendID int(11), key(friendID)); ?php $friends = mysql_query(select users.name, users.userID from users

Re: [PHP-DB] Where did my Hard Returns go?

2006-03-01 Thread Micah Stevens
list() is a language construct. On Wednesday 01 March 2006 9:18 am, Philip Pryce wrote: You can't assign a value to a function! that is actually incorrect, the list(); function assigns a value to a functions vars. -- ~Philip Pryce -- PHP Database Mailing List (http://www.php.net/) To

Re: [PHP-DB] Duplicate rows

2006-03-01 Thread Micah Stevens
SELECT DISTINCT * FROM `tablename` On Wednesday 01 March 2006 7:24 am, Miguel Guirao wrote: My dear beloved friends, I have a catalog of products that a product provider gave, sadly for me, in this CSV file there are many duplicated rows. I edited the file in my Linux system with the uniq

Re: [PHP-DB] Duplicate rows

2006-03-01 Thread Micah Stevens
Ahh, good point, yes, keep in mind you may have some index rows.. On Wednesday 01 March 2006 10:18 am, [EMAIL PROTECTED] wrote: Haha.. oh yeah.. DISTINCT works too.. in this case you'd get a list of all totally 100% unique records. If you had an auto_increment column though, you'd want to

Re: [PHP-DB] Duplicate rows

2006-03-01 Thread Micah Stevens
err columns.. sorry.. On Wednesday 01 March 2006 10:45 am, Micah Stevens wrote: Ahh, good point, yes, keep in mind you may have some index rows.. On Wednesday 01 March 2006 10:18 am, [EMAIL PROTECTED] wrote: Haha.. oh yeah.. DISTINCT works too.. in this case you'd get a list of all

Re: [PHP-DB] webhosting with php/mysql and disk quota

2006-02-27 Thread Micah Stevens
Yes, however, a few of those require root permissions which gets tricky as you DO NOT want to run internet accessable php scripts as root, in which case you're hosed. What I do it run a perl daemon as root that php then connects to as a client and requests actions, and the daemon will only

Re: [PHP-DB] webhosting with php/mysql and disk quota

2006-02-27 Thread Micah Stevens
in your permission scripts!! Miguel -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Lunes, 27 de Febrero de 2006 02:23 p.m. To: php-db@lists.php.net Subject: Re: [PHP-DB] webhosting with php/mysql and disk quota Yes, however, a few of those require root

Re: [PHP-DB] Tracking Site Version

2006-02-23 Thread Micah Stevens
Subversion: http://subversion.tigris.org On Thursday 23 February 2006 12:44 pm, Alex Major wrote: Hi there, I'm currently working on my website which is now live, and was wondering how some of you more experienced web developers record site developments if you do. I'm thinking of perhaps

Re: [PHP-DB] Sessions help needed !!!

2006-02-17 Thread Micah Stevens
Well, not much to go on, but I'd check variable scope, and register-globals. The latter being more likely as I can't see how the scope would change if you're just copying things over. -Micah On Friday 17 February 2006 2:18 pm, Chris Payne wrote: Hi there everyone, OK this script worked

Re: [PHP-DB] Found the sessions solution :-)

2006-02-17 Thread Micah Stevens
register_globals. :) On Friday 17 February 2006 2:35 pm, Chris Payne wrote: Hi Guys, Thanks for your prompt responses. I found if I put the below at the top of each page that needs to display the session data it works fine: foreach($_REQUEST as $key=$value) { $$key=$value; };

Re: [PHP-DB] slow loading page (solved)

2006-02-15 Thread Micah Stevens
On Wednesday 15 February 2006 5:24 am, redhat wrote: Well, it looks like it might be a DNS issue or at least a routing issue after all. I hit the phpinfo page on the server from home (completely different ISP) and it loaded like I thought it should have - very fast - even for phpinfo. I

Re: [PHP-DB] striping \n or \r

2006-02-15 Thread Micah Stevens
Use double quotes with \n and \r. On Wednesday 15 February 2006 10:03 am, nikos gatsis wrote: Hello list Does anybody knows how to strip new lines (\n) or \r from a string? I try $lead=str_replace('(0x0D)',' ',str_replace('(0x0A)',' ',$lead)); or $lead=str_replace('\n','

Re: [PHP-DB] slow loading page

2006-02-14 Thread Micah Stevens
On the server, you can use Dig - it's a pretty good DNS tool. On windows you can use nslookup I think. -Micah On Tuesday 14 February 2006 8:07 am, redhat wrote: On Tue, 2006-02-14 at 18:06 +1030, David Robley wrote: Micah Stevens wrote: Not enough information there to make any sort

Re: [PHP-DB] screen resolution!

2006-02-06 Thread Micah Stevens
Yes, there is. It's called HTML. You might think me daft, but HTML was actually created to allow the page to adapt to screen size. The oldest technology on the block is actually the thing to use in this situation, otherwise you're just creating extra work for yourself. A simple example:

Re: [PHP-DB] screen resolution!

2006-02-05 Thread Micah Stevens
Or you could design your page so that it's not resolution dependant. -Micah On Sunday 05 February 2006 8:28 am, PHP Superman wrote: Or you can have a page which detects resolution by javascript and redirects to another PHP page with the resolution data On 2/4/06, Bastien Koert [EMAIL

Re: [PHP-DB] timestamp value management

2006-01-29 Thread Micah Stevens
So, you want the maximum date of the result set? Just use SQL: select max(datecolumn) from table where (conditions); -Micah On Monday 30 January 2006 1:03 pm, xkorakidis wrote: hi guys! I'm trying to manage a table containing a timestamp colum - when I insert a record, I don't fill a

Re: [PHP-DB] mysql_pconnect cannot create two permanent connections to the same machine ?

2006-01-17 Thread Micah Stevens
On Tuesday 17 January 2006 7:57 am, Aarno Syvänen wrote: Hi List, I do not claim that this is bug, but it is not a nice feature either. I do have following: ? /* db.php */ $db_server=127.0.0.1; $db_user = ** $db_pass = ** $db_db = bebbicell; $db_account_server=127.0.0.1;

Re: [PHP-DB] Bit(1) datatype from mySQL

2006-01-07 Thread Micah Stevens
Use a tinyint field in mysql, (which is what bool gets translated to I think) and you'll get a number back, 0 = false, 1 = true, and you can: if ($fieldname) { do true item; } if (!$fieldname) { do false item; } This works for me, I've done before quite a bit in the past.

Re: [PHP-DB] newbie PHP/MySQL question

2006-01-02 Thread Micah Stevens
Maybe from a previous query? I mean, did you make sure the table was clear before starting the script? On Monday 02 January 2006 6:18 pm, toylet wrote: A table with a column big5 char(2) not null primary key. $target-query(delete from canton); for ($ii=0; $ii256; $ii++) { for

Re: [PHP-DB] isset or ! isset what is my problem?

2006-01-02 Thread Micah Stevens
NULL != Not set. isset() tests to see if the variable exists. If your variable has a null value it is set, it DOES exist, it just has NULL for a value. You should test for a null value if that's what you want: if ($picture == null) Or perhaps the empty() function might be what you're

Re: [PHP-DB] php mail and accentuated characters

2005-12-31 Thread Micah Stevens
Check the encoding for the web page itself. Sounds like the page is telling the client browser to encode differently than the server is encoding. -Micah On Saturday 31 December 2005 9:11 am, Jean-Philippe BATTU wrote: Hello I would like to send email from my php program. So I use the

Re: [PHP-DB] Encrypting DB content

2005-12-31 Thread Micah Stevens
) that alters the hash value of the base password the users provide. You can prepend and append the hash values to the value to be MD5'd to make it more secure. Bastien From: Micah Stevens [EMAIL PROTECTED] To: php-db@lists.php.net Subject: Re: [PHP-DB] Encrypting DB content Date: Fri, 30 Dec 2005 22

Re: [PHP-DB] Encrypting DB content

2005-12-30 Thread Micah Stevens
You can store an MD5, or SHA hash of the password, and then compare.. This is not an encrypted version of the password, rather a calculated hash of it. You can't (well, not without a bit of effort) decrypt this back into the password. The idea is when you store the password, you create the

Re: [PHP-DB] Encrypting DB content THANK YOU and nlist help

2005-12-30 Thread Micah Stevens
No problem. Try adding the -t switch to nlist to sort by file time. If you require the opposite order, add -r (for reverse).. nlist -t (order newest first) nlist -tr (order oldest first) HTH, -Micah On Friday 30 December 2005 10:32 pm, Chris Payne wrote: Hi there, Thank you for your

Re: [PHP-DB] using fsockopen to handle redirections

2005-12-23 Thread Micah Stevens
I suppose you could, but it seems a poor way, just use the header tag instead: if ($redir_needed) { header('Location: http://www.example.com'); writelog(user redirected); } On Friday 23 December 2005 2:04 am, Yemi Obembe wrote: Any way i can use fsockopen to detect url

Re: [PHP-DB] Minor Change

2005-12-12 Thread Micah Stevens
You're getting an error, after the query, put: echo mysql_error(); to find out what's happening. On Monday 12 December 2005 11:05 am, [EMAIL PROTECTED] wrote: I made tiny changes to my php file and sql table and the table won't come up. I updated the table name (and php file name) from

Re: [PHP-DB] Re: php-db Digest 23 Nov 2005 09:54:55 -0000 Issue 3170

2005-11-24 Thread Micah Stevens
Use the database for what it was designed for, storing data that needs to be parsed, and use the filesystem for what it was designed for, storing files. Just my opinion, but I think it's a good one. :) -Micah On Thursday 17 November 2005 1:19 am, Marco Schierhorn wrote: Hey, we´ve large

Re: [PHP-DB] Suggestions please!

2005-11-21 Thread Micah Stevens
Sounds like a decision needs to be made. If statements were born for that. On Monday 21 November 2005 3:41 am, JeRRy wrote: Hi, Okay I have a dj site, I have alogin script and cookies to handle the login. Next I want to add some permissions for each dj account. Maybe 3 to start

Re: [PHP-DB] Can't Upload ram file

2005-11-18 Thread Micah Stevens
Perhaps it's not file type that is the problem, but file size? -Micah On Friday 18 November 2005 6:19 am, Mohamed Yusuf wrote: the script I am using can upload images like, jpg, gif or png to the server, but it can't upload music file to the server like ram and rm. any help? -- PHP

Re: [PHP-DB] Mailer issue with PHP and MySQL

2005-11-18 Thread Micah Stevens
you're not setting the mime types correctly, and your boss probably has some spam filter that tosses incorrect email. I suggest using the PEAR Mail extension, it will automatically set this all up for you. It's very easy and nice to use. -Micah On Friday 18 November 2005 10:32 am, Chris

Re: [PHP-DB] Problem of Upload media file

2005-11-17 Thread Micah Stevens
Keep in mind you're referring to a filesystem path, and a relative one to boot, so what you're telling php is, that your upload directory is: /home/somally/public_html/music/music/media/ Which doesn't sound like what you intend. Also don't trust the php line numbers if you have significant

Re: [PHP-DB] Problem of Upload media file

2005-11-17 Thread Micah Stevens
; } ? end On 11/17/05, Micah Stevens [EMAIL PROTECTED] wrote: Keep in mind you're referring to a filesystem path, and a relative one to boot, so what you're telling php is, that your upload directory is: /home/somally/public_html/music/music/media/ Which doesn't sound like what

Re: [PHP-DB] Problem of Upload media file

2005-11-17 Thread Micah Stevens
://www.somalilyrics.com/music/media/ , therefore what about if I say *$uploadDir = 'music/media/'; *is that fine? if it is not fine would you please show me how I have to do it? On 11/17/05, Micah Stevens [EMAIL PROTECTED] wrote: Well, the error doesn't match the code, but the code says to upload the file

Re: [PHP-DB] Sending multiple items via a single form field

2005-11-14 Thread Micah Stevens
You could just seperate the data in the field's value with a delimeter like | or something you wouldn't see in the data, then explode() based on that? What kind of field are you using? Your explanation is very vague. On Monday 14 November 2005 12:40 pm, Chris Payne wrote: Hi there everyon,

Re: [PHP-DB] Table Output Question

2005-11-14 Thread Micah Stevens
You don't have to output two rows.. just do this: $color = red; // init first color. while ($row = mysql_fetch_assoc($data)) { if ($color == red) { $color = blue; } else { $color = red; } ? tr

Re: [PHP-DB] Re: Table Output Question

2005-11-14 Thread Micah Stevens
I don't see what's more elegant about. They have a good point that you only need to do one out of the two, but doing it in Javascript versus PHP only has the advantage that it puts the processing load for that on the client computer. Am I missing something? On Monday 14 November 2005 5:25

Re: [PHP-DB] Re: Table Output Question

2005-11-14 Thread Micah Stevens
Sorry if I sounded offended, I'm not. I was just curious because the advantage wasn't obvious to me. I see your point now though. Thanks for the insight. On Monday 14 November 2005 6:12 pm, Ajree wrote: Micah Stevens wrote: I don't see what's more elegant about. They have a good point

Re: [PHP-DB] Re: Table Output Question

2005-11-14 Thread Micah Stevens
Sorry, that's shorthand.. ?=$color? is the same as: ? echo $color ? ? is the start tag for a php block, ? is the end tag.. On Monday 14 November 2005 6:26 pm, Jeff Grossman wrote: Micah Stevens [EMAIL PROTECTED] wrote: You don't have to output two rows.. just do this: $color = red

Re: [PHP-DB] Re: Login Auth help?

2005-11-10 Thread Micah Stevens
I'd pull the addslashes() and use mysql_real_escape_string() instead. I'd also echo the query that's being sent to the database and compare to make sure it's doing what it should. -Micah On Thursday 10 November 2005 8:22 pm, JeRRy wrote: Hi, Well I tried this code but it fails, if I

Re: [PHP-DB] [PDO] Number of rows found by Select

2005-11-09 Thread Micah Stevens
I going wrong here? Rob Micah Stevens wrote: There's a function called 'found_rows()' function, so you could try issuing a query, then issuing a second one 'SELECT FOUND_ROWS();' and it should give the number of rows returned by the previous select. Here's details: http

Re: [PHP-DB] [PDO] Number of rows found by Select

2005-11-08 Thread Micah Stevens
mysql_num_rows() On Tuesday 08 November 2005 5:17 am, Rob C wrote: What is the recommended way to find the number of rows found by a SELECT query? PDOStatement::rowCount() doesn't work with MySQL and is a bit of a hack anyway. Doing a COUNT(*) before the SELECT is very hackish - the data

Re: [PHP-DB] [PDO] Number of rows found by Select

2005-11-08 Thread Micah Stevens
- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 08, 2005 10:51 AM To: php-db@lists.php.net Subject: Re: [PHP-DB] [PDO] Number of rows found by Select mysql_num_rows() On Tuesday 08 November 2005 5:17 am, Rob C wrote: What is the recommended way to find

Re: [PHP-DB] [PDO] Number of rows found by Select

2005-11-08 Thread Micah Stevens
On Tuesday 08 November 2005 9:13 am, Micah Stevens wrote: yeah, it would help if I read the whole post. Sorry. On Tuesday 08 November 2005 9:06 am, Dwight Altman wrote: I suppose you could use count( PDOStatement::fetchAll() ), but I understand your amazement. mysql_num_rows() is specific

Re: [PHP-DB] Using PHP to import a DB

2005-11-05 Thread Micah Stevens
system(mysql -u user -p db /tmp/mydb); On Saturday 05 November 2005 4:02 pm, Todd Cary wrote: My client switched from a dedicated server to a shared server, so I cannot use the command line to import a DB that was produced with mysqldump. Can I duplicate mysql -u user -p db /tmp/mydb

Re: [PHP-DB] Using PHP to import a DB

2005-11-05 Thread Micah Stevens
: Micah - With the -p switch, the user is asked for the password. How does that happen with the system command? Todd Micah Stevens wrote: system(mysql -u user -p db /tmp/mydb); On Saturday 05 November 2005 4:02 pm, Todd Cary wrote: My client switched from a dedicated server

Re: [PHP-DB] PHP and MSSQL on Linux

2005-11-02 Thread Micah Stevens
Run it from the command line as the apache user. See if that makes a difference. I'd guess not though. Apache's php module doesn't really put any restrictions that I know of on the scripting.. that's a strange effect.. On Wednesday 02 November 2005 10:54 am, [EMAIL PROTECTED] wrote: I

Re: [PHP-DB] PHP and MSSQL on Linux

2005-11-02 Thread Micah Stevens
of the commands (primarily traceroute and ping). Others do work (whoami) Robbert Micah Stevens [EMAIL PROTECTED] wrote on 11/02/2005, 07:58:55 PM: Run it from the command line as the apache user. See if that makes a difference. I'd guess not though. Apache's php module doesn't really put any

Re: [PHP-DB] PHP MSSQL on Linux

2005-11-01 Thread Micah Stevens
Is it from php or the mssql driver? If it's from the driver, then the library is installed at least partially correctly. If it's from php, perhaps not. From there you can narrow it down by checking the connection parameters outside of php to make sure they're right, is there a mssql client for

  1   2   3   >