[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

[PHP-DB] Too many Connections error

2001-06-20 Thread Micah Stevens
, But the documentation says that if a connection already exists, a new one will not be created. So multiple calls shouldn't be a problem, right? Any thoughts on this? THANKS! -Micah Stevens

Re: [PHP-DB] Handling Linefeeds in MySQL/PHP

2001-07-03 Thread Micah Stevens
, -Micah Stevens Raincross Technologies At 02:29 PM 7/3/2001 -0500, you wrote: I am creating a content management page that uses a textarea box to enter a chunk of text which then is sent into the database into a text-type field. I am finding that when the data is retrieved to be shown

[PHP-DB] mySQL 4.0.2-alpha

2002-01-28 Thread Paul Stevens
Hi guys, I'm running mySQL 3.23.43 at the mo' with PHP-GTK 0.5.0. Long and the short of the matter is, anyone running mySQL 4.0.2-alpha in anywhere near a production environment yet, and if so, how is it? My server is a Win2K Server SP2 box...so how steady are those windows binaries??? :-) --

[PHP-DB] MySQL/PHP dropping characters

2002-09-23 Thread Micah Stevens
configuration. It started soon after I upgraded to PHP 4.2.3 I'm running PHP as a module under Apache on a Redhat 7.2 system. Does anyone have any ideas? I'd sure appreciate it, I've been playing with php.ini for two days now, and that doesn't seem to have any effect. Thank you, -Micah Stevens

Re: AW: [PHP-DB] getting mysql_fetch_row into array

2002-09-23 Thread Micah Stevens
Nope. Anytime you set an array with no index equal to something, (i.e. $deptcount[]) it will add another element to the end of the array. If you use .=, that means append the data, but since you're not specifying an element, I'm not sure what it would do. Perhaps PHP is smart enough to just

Re: [PHP-DB] Dates

2002-09-27 Thread Micah Stevens
May I recommend setting the field type to INT, and just using timestamps? That's what I usually do, then you can manipulate things however you want. Much more convenient than the date style type I think. Looking at how the MySQL docs talk about the DATETIME field, I bet the database is doing

Re: [PHP-DB] Flush database

2002-09-27 Thread Micah Stevens
Using UNIX timestamps: if (time() - $timestamp mktime(1,0,0,0,0,0)) { // Difference it greater than one hour. Perform rejection code here } else { // Difference is one hour or less. Perform acception code here. } At 04:35 PM 9/27/2002 -0500, wade wrote: So how

Re: [PHP-DB] TOO MANY CONNECTIONS!!

2002-10-23 Thread Micah Stevens
Send me the code around the lines that are giving errors.. Doesn't look like a MySQL error to me. -Micah At 10:18 PM 10/23/2002 +0100, Georgie Casey wrote: Im getting a too many connections error in my PHP pages at http://www.free-ringtones.tv. I presume this is from the MySQL server, and I

Re: [PHP-DB] TOO MANY CONNECTIONS!!

2002-10-24 Thread Micah Stevens
Just open one connection. It'll work fine for multiple queries across several include files. I have a project right now that uses about 5 different include files at any one time, and 1 connection works great. Also keeping only one connection alive will speed up the script. -Micah At 09:14 PM

Re: [PHP-DB] Dealing with Unchecked Checkboxes

2002-10-26 Thread Micah Stevens
Unchecked checkboxed do not return a value. They don't return a NULL or empty string or anything. So what you have to do is check to see if the variable is set. If it is set, then it's checked, if it's not set, then it's unchecked. Kinda sucks if your variable names are dynamic, I just erase

Re: [PHP-DB] File Download - Complete Newbie

2002-10-26 Thread Micah Stevens
if you have the following variables: $path = your download directory path, relative to the webserver address. Like http://www.yoursite.com/downloads/;. $file = filename $name = Name or description of file. Just create your table, and in the proper cell, put: echo a href=\$path$file\$name/a;

Re: [PHP-DB] mysql_connect problem rh7.3

2002-11-02 Thread Micah Stevens
It doesn't appear you have the PHP MySQL functions installed. When you run phpinfo() you should get something like: mysql MySQL Supportenabled Active Persistent Links1 Active Links1 Client API version3.23.39 MYSQL_MODULE_TYPEbuiltin MYSQL_SOCKET/var/lib/mysql/mysql.sock MYSQL_INCLUDE MYSQL_LIBS

RE: [PHP-DB] Re: Get Last ID Inserted

2002-11-21 Thread Micah Stevens
From the MySQL docs: The most recently generated ID is maintained in the server on a per-connection basis. It will not be changed by another client. It will not even be changed if you update another AUTO_INCREMENT column with a non-magic value (that is, a value that is not NULL and not 0). So

Re: [PHP-DB] Parse Error...

2002-12-02 Thread Micah Stevens
There aren't any closing quotes on your $message variable or semicolon to tell the parser that you're done with the assignment statement. -Micah On Mon, 2002-12-02 at 15:05, Chase wrote: When trying to execute the following script to send the contents of a table via mail() I am getting

Re: [PHP-DB] Parse Error...

2002-12-02 Thread Micah Stevens
, 2002-12-02 at 16:30, Chase wrote: There is a single quote and semicolon on the line under /html that I thought would be defining the end of the assignment. Should I have used double quotes instead of single? Chase Micah Stevens [EMAIL PROTECTED] wrote in message 1038870535.23725.123

[PHP-DB] Progress output

2003-01-04 Thread Micah Stevens
I just wrote a script that goes through a database and does a lot of stuff to the data, it takes about 30 seconds to a minute to run through everything, so I thought it would be nice to show a progress indicator of some sort. What I have at this point, is that after every record is processed, I

Re: [PHP-DB] Progress output

2003-01-04 Thread Micah Stevens
Heh.. I did.. Thanks! -Micah On Sat, 2003-01-04 at 12:05, Jason Wong wrote: On Sunday 05 January 2003 03:25, Micah Stevens wrote: I just wrote a script that goes through a database and does a lot of stuff to the data, it takes about 30 seconds to a minute to run through everything, so

Re: [PHP-DB] PHP/MySQL

2003-01-04 Thread Micah Stevens
The script is generating a filename based on the id and then copies the file from somewhere to the new location. It's doing just what it's supposed to. IF you don't want it to do it, just use the following instead: // // Insert the photo details into the database

Re: [PHP-DB] Sore head...

2003-01-07 Thread Micah Stevens
Heh. I used this app in one of my sites, (www.9250x.com) it has some nice features, but whoever programmed it didn't intend for anyone else to make changes, that's for sure. The '%%' in the first snippet is some SQL code, '%' is a wildcard in SQL, so the gist of that section is If

Re: [PHP-DB] Mouseover question...

2003-01-08 Thread Micah Stevens
This is not a mouseover. This builds the links for the popup window that appears when you click on the event in the calendar. Go to the common.php file and find the dLink() function. -Micah On Wed, 2003-01-08 at 09:45, NIPP, SCOTT V (SBCSI) wrote: OK, this isn't really a DB question,

RE: [PHP-DB] Mouseover question...

2003-01-08 Thread Micah Stevens
The links in the calendar are made up of the titles of you events. The displayed length is restricted until you mouse over them, then they expand to show their entire length. This is the code that does that. -Micah On Wed, 2003-01-08 at 10:08, NIPP, SCOTT V (SBCSI) wrote: You are

Re: [PHP-DB] javascript and submitting forms

2003-01-13 Thread Micah Stevens
The window.close(); function is not returning control to the form after closing the window. You must tell it to do so. Use: onClick=return window.close(); This will return the window.close() value to the submit button so that it can do its thing after the window has been closed. Use the same

Re: [PHP-DB] javascript and submitting forms

2003-01-13 Thread Micah Stevens
value=Close and Save onClick=return window.close(); /form /body /html On Mon, 2003-01-13 at 14:44, Micah Stevens wrote: The window.close(); function is not returning control to the form after closing the window. You must tell it to do so. Use: onClick=return window.close

Re: [PHP-DB] Unlimited Categories

2003-01-13 Thread Micah Stevens
Use the parent/child relationship thing: CREATE TABLE Categories ( CategoryID int(11) NOT NULL auto_increment, ParentID int(11) NOT NULL default '0', Category_Name tinytext NOT NULL, PRIMARY KEY (CategoryID) ) TYPE=MyISAM; So at each level you can find the subcategories by: SELECT *

[PHP-DB] Excel ODBC connections

2003-01-17 Thread Micah Stevens
Hi, I have a gig right now that the client wants me to connect to an Excel spreadsheet that contains the data for the website. It's a real low-traffic area, but I do know that these types of connections only can handle a few connections at a time. My question is, does anyone know what the

Re: [PHP-DB] [NB] Mail() question

2003-01-18 Thread Micah Stevens
The mail() function returns true if it functions, i.e. if you have all the parameters correct, and that sort of thing. If the SMTP server rejects the email, you'll still get true returned. I ran into this a while back. Try and do a manual connection to the SMTP server from your PHP machine and see

Re: [PHP-DB] [NB] Mail() question

2003-01-18 Thread Micah Stevens
On Saturday, January 18, 2003, at 01:47 PM, Micah Stevens wrote: The mail() function returns true if it functions, i.e. if you have all the parameters correct, and that sort of thing. If the SMTP server rejects the email, you'll still get true returned. I ran into this a while back. Try and do

Re: [PHP-DB] $HTTP_POST_VARS

2003-01-27 Thread Micah Stevens
No, if you're trying to store an array in the database, use serialize(); http://www.php.net/manual/en/function.serialize.php Something like this: $serialized_data = serialize($HTTP_POST_VARS); $serialized_data = addslashes($serialized_data); mysql_query(INSERT INTO ads (post_vars, createdate)

Re: [PHP-DB] Re: to connect access mdb

2003-02-01 Thread Micah Stevens
looks like PHP to me. COM connections to Access only handle a few connections at a time. The use of a real DB server is reccommended in your situation.i Edwin Boersma wrote: To: [EMAIL PROTECTED] Date: Sat, 01 Feb 2003 18:41:49 +0200 From: Edwin Boersma [EMAIL PROTECTED] Subject: [PHP-DB] Re:

[PHP-DB] Storing Boolean Values

2003-02-14 Thread Micah Stevens
I've been storing checkbox values in MySQL as Enum's for a while, I was wondering if there's a better way to do things. Is this the most compact way to store a boolean value? -Micah

[PHP-DB] Looking for a Junior PHP/mySQL programmer - Sydney.AU

2003-02-20 Thread Skeeve Stevens
interested... please email: [EMAIL PROTECTED] (not the company you will be working for) ___ Skeeve Stevens, RHCE Email: [EMAIL PROTECTED] Website: www.skeeve.org - Telephone: (0414) 753 383 Address: P.O Box 1035, Epping, NSW, 1710

Re: [PHP-DB] disable right-click in all frames.

2003-02-22 Thread Micah Stevens
Sure there is, just fopen the remote page, get it, and then parse it until you know you're in the body tag, where you can insert your Javascript. Then just output the rest. -Micah On Sat, 2003-02-22 at 05:22, Matt wrote: hey everyone. i have a php script that opens up a new window with

RE: [PHP-DB] disable right-click in all frames.

2003-02-22 Thread Micah Stevens
in depth explanation please? Thank you. Matt -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Saturday, February 22, 2003 2:07 PM To: Matt Cc: [EMAIL PROTECTED] Subject: Re: [PHP-DB] disable right-click in all frames. Sure there is, just

Re: [PHP-DB] Parse Error

2003-02-26 Thread Micah Stevens
If statements use curly braces. Do this: if ($packages == 1){ if ($airporttransfer == car) $airporttransfer2 = 12.00); if ($airporttransfer == bus) $airporttransfer2 = 10.00); if ($airporttransfer == none) $airporttransfer2 = 0.00); } On Wed, 2003-02-26 at 16:42, Chris Payne wrote: Hi

Re: [PHP-DB] Cropped Text

2003-03-12 Thread Micah Stevens
substr(); On Wed, 2003-03-12 at 13:21, Dallas Freeman wrote: I dunno what it is called so that is why I am asking, so that I can search the web about it. What do you call the method of cropping text back, so that there are a limited number of characters shown, the rest is cut off.

[PHP-DB] Efficiency question

2003-06-26 Thread Micah Stevens
I would guess that: $data = mysql_fetch_assoc(mysql_query(select * from some_table limit 1)); would be faster than: $pointer = mysql_query(select * from some_table limit 1); $data = mysql_fetch_assoc($pointer); but I'm not sure, php may optimize this. Anyone know the answer? I'm taking over

Re: [PHP-DB] Re: Efficiency question

2003-06-27 Thread Micah Stevens
/manual_MySQL_Optimisatio n.html#Estimating_performance Peter On Thu, 26 Jun 2003, Hugh Bothwell wrote: Micah Stevens [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] $data = mysql_fetch_assoc(mysql_query(select * from some_table limit 1)); would be faster than

Re: [PHP-DB] Re: A complex query problem

2003-07-04 Thread Micah Stevens
MySQL version 4.x has Subquery support. On Fri July 4 2003 5:54 am, Nadim Attari wrote: From MS-SQL Server Manual: A subquery is a SELECT query that returns a single value and is nested inside a SELECT, INSERT, UPDATE, or DELETE statement, or inside another subquery. A subquery can be used

Re: [PHP-DB] AGONIZING Mysql Select DB issue.

2003-08-17 Thread Micah Stevens
Try using the SQL to select which database. example, instead of: select * from table1 use: select * from database1.table1 if that works, and the php command doesn't that may mean the the mysql client lib is broken, although, I've been using it with mysql 4 and it seems to work fine.

Re: [PHP-DB] AGONIZING Mysql Select DB issue.

2003-08-18 Thread Micah Stevens
Agreed, sounds like a pain. to keep two copies. But if you do it to both copies, and use the same code both places (connect via URL, not 'localhost' even if you are on the same machine) then it wouldn't be any extra trouble. The OS will realize that the URL is localhost and make that connection

Re: [PHP-DB] Best way to multi-thread (Kind of)?

2003-08-18 Thread Micah Stevens
For each message have a autoincrement message ID, an INT field is sufficient I would guess. Also in each message record, have a parentID field as INT, default this to 0, and if the message is a reply to another message, make the parentID = to the first message's ID field. When you're

Re: [PHP-DB] Queries probably timing out

2003-08-19 Thread Micah Stevens
What leads you to believe that it's a query timeout? Is the php script timing out waiting for the database? Do you get an error saying something about Max Execution Time? If so, you may want to set that higher in your script. Go check out:

Re: [PHP-DB] Calculating daylight savings time

2003-08-19 Thread Micah Stevens
the notes on php.net. Thanks for your help, -Lisi At 12:06 AM 8/17/03 -0700, Micah Stevens wrote: As an afterthought, the docs are inspecific on who's daylight savings schedule that the function returns. There's another user submitted function in the comments list that takes into account

Re: [PHP-DB] Queries probably timing out

2003-08-19 Thread Micah Stevens
(TestData2.journal,Te s tData2.description) WHERE TestData1.Dept'D1'; Thanks, John -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: 19 August 2003 18:00 To: PHP-DB List Subject: Re: [PHP-DB] Queries probably timing out What leads you to believe that it's

Re: [PHP-DB] Calculating daylight savings time

2003-08-20 Thread Micah Stevens
setlocale - what does this do in plain English? Thanks for the info, -Lisi At 10:05 AM 8/19/03 -0700, Micah Stevens wrote: Here's the example code I was talking about in the docs, you should really read the user submitted notes in the docs, they're very helpful, moreso than the docs from

Re: [PHP-DB] Selection problem

2003-09-07 Thread Micah Stevens
Since you didn't include the form, I'm going to have to make a couple of assumptions: $nameb is the recipe field. $pointsb is the points field. You want to use SQL statement 1 if they select points, 2 if they select recipies, but those aren't the only possibilities with the form. It sounds to

Re: [PHP-DB] MySQL depreciated mysql_list_* commands: Replacements?

2003-09-10 Thread Micah Stevens
You have a couple of choices if I remember correctly.. For a table of name 'TBL': describe TBL; explain TBL; show columns from TBL; -Micah On Wed September 10 2003 12:08 pm, Peter Beckman wrote: So PHP is saying mysql_list_tables is depreciated. I replaced it with mysql_query(SHOW TABLES

Re: [PHP-DB] MySQL depreciated mysql_list_* commands: Replacements?

2003-09-10 Thread Micah Stevens
Now that I see code, I would say just run a 'SELECT * FROM table LIMIT 1' on your table, and run it through your code. That should give you what you want. -Micah On Wed September 10 2003 12:55 pm, Peter Beckman wrote: On Wed, 10 Sep 2003, Micah Stevens wrote: describe TBL; explain TBL

Re: [PHP-DB] Working query not able to run with PHP script.

2003-09-18 Thread Micah Stevens
Try putting backticks around the table name in the drop table statement. Is xxx the database name? -Micah On Thu September 18 2003 2:09 pm, Jonathan Villa wrote: I have several tables I want to delete as well as their reference in another database The query produced is this:

Re: [PHP-DB] JOIN across db's in MySQL

2003-09-18 Thread Micah Stevens
You may be able to use mysql_fetch_array() and use numerical indexes to reference the redundant names, but isn't it easier and better to just assign aliases like you're doing? It makes for more readable code, that's for sure. -Micah On Thu September 18 2003 12:55 pm, Mike Tallroth wrote:

Re: [PHP-DB] sql optimizing assistance

2003-09-19 Thread Micah Stevens
run this query: EXPLAIN SELECT Question.Text_Long, AVG( Response ) FROM `Response` INNER JOIN Question ON Question.Question_Key = Response.Question_Key WHERE Question.Question_Key LIKE '2003%' GROUP BY Response.Question_Key ORDER BY Question.Question_Key ASC and post the results. This will

Re: [PHP-DB] Parse Errors...

2003-10-09 Thread Micah Stevens
What line is the parse error on? On Thu October 9 2003 12:01 pm, NIPP, SCOTT V (SBCSI) wrote: I keep receiving a parse error every time I try and view the page I am working on. I am developing this very simple application in DreamWeaver MX 2004. Here are lines 3-16: ?php

Re: [PHP-DB] Query works but can't echo variable :'(

2003-10-26 Thread Micah Stevens
You're using an alias of 'date' instead of DateOfOrder, so that should be reflected in the array key. So: $Date = $OrderDate[date]; -Micah On Sun October 26 2003 4:22 pm, Graeme McLaren wrote: Hey everyone, the following query and code works fine but I can't understand why I can't echo

Re: [PHP-DB] populating select and searching to criteria

2003-10-27 Thread Micah Stevens
First: Use the SQL distinct command.. it's explained here: http://www.mysql.com/doc/en/SELECT.html That will get you unique values. Then just loop through the result: while ($d = mysql_fetch_assoc($return)) { ?option value=?=$d['value']??=$d['name']?/option ? } Second: get the value

Re: [PHP-DB] populating select and searching to criteria

2003-10-27 Thread Micah Stevens
This may be a dumb comment, but those variable don't make any sense, you'll have to replace them with stuff that relates to the query and the database. -Micah On Mon October 27 2003 8:34 pm, Shannon Doyle wrote: Thanks Micah, while ($d = mysql_fetch_assoc($return)) { ?option

Re: [PHP-DB] Quick Question: Line Breaks

2004-01-08 Thread Micah Stevens
\n is not converted to a newline unless you use double quotes around the string. See: http://us3.php.net/manual/en/language.types.string.php -Micah On Thu January 08 2004 7:58 pm, Jacob Hackamack wrote: Hello, I have a couple of quick questions. When I execute this code on my php page

Re: [PHP-DB] Searching a String mysql

2004-01-11 Thread Micah Stevens
stristr(); http://us2.php.net/stristr -Micah On Sun January 11 2004 8:29 pm, Rick wrote: Hi all, Does anyone have a class or function that can be used to search any given string from a textfield ie: $string = london rome paris... Thanks in advance! R -- PHP Database Mailing

Re: [PHP-DB] Connectivity PHP4 mysql

2004-01-15 Thread Micah Stevens
Sounds like you don't have MySQL turned on in PHP. Check phpinfo(); to see if the module is listed in there. -Micah On Thu January 15 2004 2:42 pm, Georg Herland wrote: Hi I've got two servers, one (RH9) with PHP4 and mysql-server and one (RH7.3) running PHP4 and mysql client only. The

Re: [PHP-DB] using query_strings in sql

2004-01-21 Thread Micah Stevens
I may be misunderstanding you, but your first statement about pulling from a query string is throwing me. ?php echo $section; ? will only display the value of $section on the screen. You will need to build a form to get a value into $section. form action=soemthing.php input type=text

Re: [PHP-DB] using query_strings in sql

2004-01-21 Thread Micah Stevens
string when someone lands on the page there needs to be a default value set: // setting the default variables if(!isset($order)){$order=ASC;} Unfortunately its not working :( thx, gil -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Wednesday

Re: [PHP-DB] Selecting last record only

2004-01-21 Thread Micah Stevens
Reverse the order and limit the result to 1. For example, change: SELECT date, item from some_table To: Select date, item from some_table ORDER BY date DESC LIMIT 1 to get the latest dated item. -Micah On Wed January 21 2004 11:49 am, -{ Rene Brehmer }- wrote: Hi gang this is probably

Re: [PHP-DB] using query_strings in sql

2004-01-21 Thread Micah Stevens
Here goes: 1) That should work fine. Be sure and enclose the SQL in double quotes or the variable will not get translated into its value. 2) That's fine too, nothing wrong there. 3) this is wrong, but it looks like you just ommited the SQL statement. Be sure and use the or die statement as

Re: [PHP-DB] using query_strings in sql

2004-01-21 Thread Micah Stevens
. so query_string = ?class=Xsection=Yorder=ASC I can't input these variables : $class,$section,$order into the SQL statement SELECT * FROM classes WHERE section=$section ORDER BY $class $order -- gil thx for all your patience -Original Message- From: Micah Stevens [mailto

Re: [PHP-DB] CREATE TABLE problem

2004-01-21 Thread Micah Stevens
mysql_db_query ($dbname,$query,$link) or die(myself_error()); will help you more than your if/then statement.. change that, and check out the error message. On Wed January 21 2004 2:33 pm, js wrote: ok im making this page and every single time i try to execute it, it tells me it was not

Re: [PHP-DB] Help with a COUNT / SELECT query

2004-01-23 Thread Micah Stevens
SELECT COUNT(WMS_Area.Area_ID) AS complete_areas FROM WMS_Area, WMS_Bookings WHERE WMS_Area.Area_ID = WMS_Bookings.Area_ID AND MIN(WMS_Bookings.Booking_Status) = 2 GROUP BY WMS_Area.Area_ID Or something like that.. there's probably a better way to do it.. On Fri January 23 2004 1:05 pm,

Re: [PHP-DB] counting a value REVISED pt2

2004-01-30 Thread Micah Stevens
select count(FavNum) as Favorite where FavNum = 2; On Fri January 30 2004 8:19 pm, js wrote: p.s.- im using PHP with MySQL... if that helps any. thanks i want to know what i can use to count the number of times a value appears in a column listing where different values are listed. for

Re: [PHP-DB] Functions

2004-02-02 Thread Micah Stevens
Chis, I think this might do what you want: foreach ($_REQUEST as $key = $value) { switch ($key) { case email: // do email stuff break; case address: // do address stuff

Re: [PHP-DB] PHP Standalone?

2004-02-05 Thread Micah Stevens
http://us4.php.net/manual/en/features.commandline.php On Thu February 5 2004 3:17 pm, Chris Payne wrote: Hi there everyone, I need to produce a system which uses databases but NOT on a webserver, I heard something about a PHP distro that is being developed which acts like an executable,

Re: [PHP-DB] Associated popup menu (php/mysql)

2004-02-05 Thread Micah Stevens
Javascript is client side programming, PHP is server side and unable to control actions and make decisions on what's happening in the browser except in a 'third person' manner. Simply put, you can't do this with PHP. On Thu February 5 2004 5:21 pm, alb_shop wrote: Hello all, I've been

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Micah Stevens
mysql_query does not return a specific value, rather a pointer to a range of values (depending on what the query returns..) so what you're seeing is normal. I think depending on your error settings, PHP will actually return the value as 'POINTER' or something like that to let you know it's not

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Micah Stevens
Right.. a resource.. sorry. On Thursday 26 February 2004 12:55 pm, [EMAIL PROTECTED] wrote: An interesting thought. I tried this: echo Term: $search, Returns: $arrayword, UserIP: $ipbr; $logit = mysql_query(INSERT INTO log SET term='$search', returns='$arrayword', time=CURTIME(),

Re: [PHP-DB] What's wrong with this query?

2004-02-26 Thread Micah Stevens
Micah Stevens wrote: Right.. a resource.. sorry. On Thursday 26 February 2004 12:55 pm, [EMAIL PROTECTED] wrote: An interesting thought. I tried this: echo Term: $search, Returns: $arrayword, UserIP: $ipbr; $logit = mysql_query(INSERT INTO log SET term='$search', returns='$arrayword

Re: [PHP-DB] mysql_num_rows

2004-03-03 Thread Micah Stevens
because you're supplying it with a string not the result of the query.. uncomment your line that says: $result = mysql_query($query, $db); and change the num rows line to: else if (mysql_num_rows($result)==1) Your line that gets the column results will fail for the same reason, give it the

Re: [PHP-DB] mysql_num_rows

2004-03-03 Thread Micah Stevens
the $db variable isn't referencing a proper connection. As you did not create the db connection in this function, I'm assuming it's a scope problem. Make sure that $db is global, and then add a global statement to the first line in the function for this variable. the $db you're referencing

Re: [PHP-DB] BLOB

2004-03-14 Thread Micah Stevens
Why would blob be any more secure than anything else? If encryption isn't enough, you're not using the right encryption. :) -Micah On Sunday 14 March 2004 05:18 pm, Ng Hwee Hwee wrote: hi all.. thank you so much for your help! i tried out the all the different syntax and the following

Re: [PHP-DB] BLOB

2004-03-16 Thread Micah Stevens
$data = mysql_query(select blob_column_name from table name); while ($d = mysql_fetch_array($data)) { echo $d['blob_column_name'].br; } .. or something like that. -Micah On Tuesday 16 March 2004 05:16 pm, Ng Hwee Hwee wrote: hi, i've read the blob document in MySQL manual and i

Re: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Micah Stevens
That would be the way to do it except that MySQL doesn't support sub-selects until version 4.1, which is in alpha still. -Micah On Tuesday 27 April 2004 04:05 pm, Swan, Nicole wrote: Have you tried a nested query? I think your problem is that you're really using information from two

Re: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Micah Stevens
trying to do something else that I'm not taking into account. -Micah On Tuesday 27 April 2004 04:14 pm, [EMAIL PROTECTED] wrote: So you're saying there's no way to do it in this version with a single statement? Thanks, John -Original Message- From: Micah Stevens [mailto:[EMAIL

Re: [PHP-DB] Request for help on (My)SQL Statement

2004-04-27 Thread Micah Stevens
it into a mailing list per se) they'll start using it. The design may be flawed but I don't know any other way to do it. As long as it serves the purpose and isn't a total abomination... :) Thanks, John -Original Message- From: Micah Stevens [mailto:[EMAIL PROTECTED] Sent: Tuesday, April 27

Re: [PHP-DB] Image / file uploader

2004-04-29 Thread Micah Stevens
Do this: echo ( form method='post' action='.$_SERVER[PHP_SELF].' encType='multipart/form-data'); PHP doesn't handle array's well in echo statements, so you have to stop the echo, concat the array, and then continue the echo. -Micah On Thursday 29 April 2004 04:46 pm, Craig Hoffman wrote:

Re: [PHP-DB] mysql adding

2004-06-04 Thread Micah Stevens
update field = field + 1; On Friday 04 June 2004 01:47 pm, Steven Morgan wrote: is there anyway to add 1 to an int with 1 mysql query, i know i can pull the value down with a SELECT then add 1 with php.. then do an UPDATE on it.. but i didn't know if there was any other way? thanks Steve

Re: [PHP-DB] mysql adding

2004-06-04 Thread Micah Stevens
Wait, sorry, It's late.. update tablename set fieldname = fieldname + 1; That will increment all the rows in table, you can add a 'where' statement to limit the update. update tablename set fieldname = fieldname + 1 where indexfield = someindex; -Micah On Friday 04 June 2004 01:47 pm,

[PHP-DB] query problem..

2004-07-14 Thread Micah Stevens
Hi, I'm getting an unknown colum `num` in where clause error with this query: $options = mysql_query(select options.*, count(option_items.optionID) as `num` from options left join

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
Thank you Torsten , They're backticks, and I get the same error after removing them. Any other ideas? -Micah On Wednesday 14 July 2004 11:48, Torsten Roehr wrote: Micah Stevens [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I'm getting an unknown colum `num

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
It is a column.. ;) And the docs say you can refer to an aliased aggregate column in the where clause: http://dev.mysql.com/doc/mysql/en/SELECT.html I'll take this to the mysql list.. Thanks for your help.. -Micah On Wednesday 14 July 2004 12:01, Torsten Roehr wrote: Micah Stevens [EMAIL

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
Sorry, I'm wrong.. WHERE cannot refer to aggregate columns.. you must use the HAVING clause. -Micah On Wednesday 14 July 2004 12:07, Micah Stevens wrote: It is a column.. ;) And the docs say you can refer to an aliased aggregate column in the where clause: http://dev.mysql.com/doc

Re: [PHP-DB] Re: query problem..

2004-07-14 Thread Micah Stevens
BY options.optionID HAVING n 0 -Micah On Wednesday 14 July 2004 12:07, Micah Stevens wrote: It is a column.. ;) And the docs say you can refer to an aliased aggregate column in the where clause: http://dev.mysql.com/doc/mysql/en/SELECT.html I'll take this to the mysql list.. Thanks for your help

Re: [PHP-DB] Re: Joinging two different mySQL result?

2004-08-14 Thread Micah Stevens
select users.usr as email, users.aktiv, users.newsletter, users.emailblock, users.htmlmode, users.none_registered, users_info.* from users, users_info WHERE users.id = users_info.cid That would work. There's no obvious way to join in the

Re: [PHP-DB] Array

2004-08-26 Thread Micah Stevens
Since you provided no value's it's a little tough, but the general for would be: $parts = array( array(PN = $row1col1, Desc = $row1col2, Qty = $row1col3), array(PN = $row2col1, Desc = $row2col2, Qty = $row2col3) ); Depending on your implimentation, it maybe easier to use some sort of loop

Re: [PHP-DB] Updating a table when using LEFT JOIN

2004-08-26 Thread Micah Stevens
From the Mysql docs: Starting with MySQL 4.0.4, you can also perform UPDATE operations that cover multiple tables: UPDATE items,month SET items.price=month.price WHERE items.id=month.id; The example shows an inner join using the comma operator, but multiple-table UPDATE statements can use

Re: [PHP-DB] Zip Code Fields

2004-09-08 Thread Micah Stevens
you can store it as an integer, but make sure you use a proper print function to display it later that preserves the 5 digits, such as: echo str_pad($zip, 5, 0, STR_PAD_LEFT); or something like that.. I take it you have no plans to store 10 digit zips? -Micah On Wednesday 08

Re: [PHP-DB] Please help

2004-09-08 Thread Micah Stevens
Change the code to this: $result = mysql_query($sql . . $sql_ext . limit 0,1) or die(mysql_error().br.$sql. .$sql_ext . limit 0,1br); And you'll get the error from mysql and a copy of the actual query. Without that, it's pretty tough to help. -Micah On Wednesday 08 September 2004

Re: [PHP-DB] Please help

2004-09-10 Thread Micah Stevens
did you make the change to the code I suggested? What does MySQL say the error is? -Micah On Friday 10 September 2004 07:49 am, Stuart Felenstein wrote: As I said this is a code generator (dbqwiksite). So, describing the process for creating the code is different. The $sql is fine, as

Fwd: Re: [PHP-DB] Please help

2004-09-10 Thread Micah Stevens
. Is that not the case ? As a matter of fact, there isn't even a where or like in my query. Then again myabe that's why I can see *all* records but not run a search. Can you please provide an exmample of the column name bteween where and like ? Thank you. Stuart --- Micah Stevens [EMAIL

Re: [PHP-DB] Please help

2004-09-10 Thread Micah Stevens
/HTML --- Micah Stevens [EMAIL PROTECTED] wrote: there is a WHERE on the last line of the statement you sent me. Where's are in the form of: WHERE value condition value Yours is in the form: WHERE condition value You're not providing anything to compare the latter value

Re: [PHP-DB] Please help

2004-09-10 Thread Micah Stevens
echo $sql. .$sql_ext; Read the docs: http://www.php.net/echo http://www.php.net/mysql_query On Friday 10 September 2004 01:18 pm, you wrote: Now that I'm not getting an invalid error message any longer, how can I get it to echo the sql statement ? Stuart --- Micah Stevens [EMAIL

Re: [PHP-DB] Please help

2004-09-14 Thread Micah Stevens
. Then again myabe that's why I can see *all* records but not run a search. Can you please provide an exmample of the column name bteween where and like ? Thank you. Stuart --- Micah Stevens [EMAIL PROTECTED] wrote: If you look at the query, there's no column name between 'WHERE' and 'LIKE

Re: [PHP-DB] Help please, back to an error

2004-09-14 Thread Micah Stevens
I'm thinking you should either get a better code generator, or learn more about php.. :) -Micah On Monday 13 September 2004 02:49 pm, Stuart Felenstein wrote: Thanks to help here I was able to overcome some ivalid query errors. Now I'm back, (probably the same mistake) It's coming off

Re: [PHP-DB] Two session for the same user, possible?

2004-10-21 Thread Micah Stevens
p.s. you can also designate a session ID. If you do this you may be able to have two sessions running concurrently. Never tried it myself, but it should work. -Micah On Thursday 21 October 2004 02:03 pm, Micah Stevens wrote: The Session ID is the same, so it will access the same variables

  1   2   3   >