Re: [PHP] Creating an Advanced Form

2012-11-02 Thread Robert Stone
Hi Jonathan, Haven't used MySql for ages. More used to Oracle and PostgreSql. Your table nmc_cd contains foreign keys pointing to nmc_category and nmc_publisher. Create a view containing all the data from those three tables using implicit joins as the data in table nmc_cd should NOT contain any

Re: [PHP] Creating an Advanced Form

2012-11-02 Thread tamouse mailing lists
I'm sorry. This code just makes me weep. Let's just take a quick look at this line here: > $rsSearch = mysql_query($sqlSearch); You have not supplied a database connection, so mysql_query will fail. Further, you have not even checked the result to *see* if it failed. Once you fix those things,

[PHP] Question

2012-11-02 Thread Silvio Siefke
Hello, i have compile PHP 5.4.8 on my Debian System. I have before Version 5.4.7. I delete before all old Files from PHP and then run the commands: ./configure --sysconfdir=/usr/local/etc --with-pear --enable-bcmath --with-bz2=/usr --disable-calendar --enable-ctype --without-curl --without-cur

Re: [PHP] Differentiate Line breaks and Paragraphs

2012-11-02 Thread Stuart Dallas
On 2 Nov 2012, at 19:32, Simon Dániel wrote: > Is there a way to make difference between line breaks and paragraphs, when > I save a text to a database from a user input? The new line characters (\n, > \r) are not too consequent to determine when did the user only one new line > or more new lines

[PHP] Differentiate Line breaks and Paragraphs

2012-11-02 Thread Simon Dániel
Hi, Is there a way to make difference between line breaks and paragraphs, when I save a text to a database from a user input? The new line characters (\n, \r) are not too consequent to determine when did the user only one new line or more new lines. (Some clients make only \n or \r, some others ma

[PHP] Re: Creating an Advanced Form

2012-11-02 Thread Matt Graham
Jonathan Davies wrote: > I am attempting to create an advanced form with 9 different search > fields. I am [concatenating a bunch of bits together] so I don't > have to [create] over 300,000 IF statements. > mysql_fetch_assoc(): supplied argument is not a valid MySQL > result resource on line 261

Re: [PHP] Creating an Advanced Form

2012-11-02 Thread Jay Blanchard
[snip] Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/numyspace.co.uk/web_users/home/~unn_w11014928/public_html/search.php on line 261[/snip] It would appear that your query is not returning a result. Echo out the query and try running

[PHP] Creating an Advanced Form

2012-11-02 Thread Jonathan Davies
Hi, I am attempting to create an advanced form with 9 different search fields.  I am using the WHERE 1 AND sql function to add onto the generated end sql function so I don't have to created over 300,000 IF statements. The code below is showing up this error: [quote]Warning: mysql_fetch_assoc()