[PHP-DB] Using OR in a SELECT statement

2006-03-27 Thread Arno Kuhl
Newbie MySQL question... I have a situation where if I don't have a custom value then I must use the default value. There will always be a default value but there may also be a custom value. I could do this with: select value where id and custom condition if (EOF) { select value where id and d

Re: [PHP-DB] MySQLi Prepared Statements

2006-03-27 Thread Georg Richter
Am Mo, den 27.03.2006 schrieb Rob Hamilton um 19:37: Hello Rob, > Is it possible to construct an array of this type and pass it to these > functions, and if so how? For such cases you should use call_user_func_array. /Georg -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, v

Re: [PHP-DB] if() and else() help needed

2006-03-27 Thread Chris
JeRRy wrote: Hi, Yes the user is logged in. The system knows who is tipping by their nickname and unique id system. So if I put the update query in the else statement would this be the easy fix? Don't know - I was offering a suggestion only. Without the full code we can't really help m

Re: [PHP-DB] if() and else() help needed

2006-03-27 Thread JeRRy
Hi, Yes the user is logged in. The system knows who is tipping by their nickname and unique id system. So if I put the update query in the else statement would this be the easy fix? I use something like a field called tipped in the table, so if they have tipped it goes to y a

Re: [PHP-DB] if() and else() help needed

2006-03-27 Thread Chris
JeRRy wrote: Hi, I'll admit it, this is damned messy. But I want to learn from the list in how to sort it out. Than for future refrence I will know... Now I am running 2 different queries/statements here completely seperate. I have made the "nickname" field in the database UNIQUE.

[PHP-DB] if() and else() help needed

2006-03-27 Thread JeRRy
Hi, I'll admit it, this is damned messy. But I want to learn from the list in how to sort it out. Than for future refrence I will know... Now I am running 2 different queries/statements here completely seperate. I have made the "nickname" field in the database UNIQUE. So than when

Re: [PHP-DB] Session don't store after header("Location: ...")

2006-03-27 Thread Philip Hallstrom
Philip Hallstrom ha scritto: Don't use Header("Location:..."). Instead spit back very minimal javascript that does something like: document.location.href = '.'; That way the cookies that get sent back in the header will take affect. I have to use header("Location..."), cause I'm using

Re: [PHP-DB] Session don't store after header("Location: ...")

2006-03-27 Thread Giacomo
Philip Hallstrom ha scritto: Don't use Header("Location:..."). Instead spit back very minimal javascript that does something like: document.location.href = '.'; That way the cookies that get sent back in the header will take affect. I have to use header("Location..."), cause I'm using

Re: [PHP-DB] Session don't store after header("Location: ...")

2006-03-27 Thread Philip Hallstrom
Hi everybody, I have a problem with mysql session handler and redirect. My situation: - mysql session handler - one page is "posted" to another page, that saves a session variable and redirect to the first page again. If I do the redirect the variable is not properly setted, otherwise it's all o

[PHP-DB] Session don't store after header("Location: ...")

2006-03-27 Thread Giacomo
Hi everybody, I have a problem with mysql session handler and redirect. My situation: - mysql session handler - one page is "posted" to another page, that saves a session variable and redirect to the first page again. If I do the redirect the variable is not properly setted, otherwise it's all o

Re: [PHP-DB] Displaying results from a query properly.

2006-03-27 Thread Greg Skouby
On Fri, Mar 24, 2006 at 04:19:10PM +, Alex Major wrote: > Hi there. > This isn't a major problem, more of a matter of aesthetics. > Basically, I have a query which pulls a list of usernames from the database > (based on their user level). > > These users should then listed in this fashion. >

[PHP-DB] MySQLi Prepared Statements

2006-03-27 Thread Rob Hamilton
Hi I am current trying to migrate an existing system using MySQLi to use PDO and I have a quick question with regards to Prepared Statements. Essentially I'd like to replicate the Prepared Statement functionality of PDO using MySQLi so that I can gradually update all the required pages to use

RE: [PHP-DB] Displaying results from a query properly.

2006-03-27 Thread Ford, Mike
On 24 March 2006 16:40, Alex Major wrote: > Thanks, works like a charm (had to make is -2 instead of -1 > as it added a > space after each result). Hadn't thought of something so simple. > > On 24/3/06 16:22, "Bastien Koert" <[EMAIL PROTECTED]> wrote: > > > Build it up as a string and remove the