473,396 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Dreamweaver recordset will not give me null

i know i know, wysiwyg's are not for loosers and all that but i've been
coding php for about 6 months now and the one thing ive always wanted
to do was see a live preview of my php so i can format tables without
having to save and upload everytime- i figured out how to make
dreamweaver do that! for the most part its pretty awesome (bulky/wierd
php tho) but theres one thing that i JUST CANT FIGURE OUT- i have a
recordset that will not return null from a querystring. when i feed the
search results script an 'empty' variable (i just hit enter on the
search form without typing in a query) it lists all of the entries
instead of none of them. if anyone has ran into this situation before
id really like to know what you did. its probably one stupid little
setting that im being an idiot about, like it usually is, but i spent
all night last night running through these groups and running through
documentation. thanks a lot!

Jul 17 '05 #1
4 1628
In article <11**********************@z14g2000cwz.googlegroups .com>,
"kiqyou_vf" <so*******@gmail.com> wrote:
i know i know, wysiwyg's are not for loosers and all that but i've been
coding php for about 6 months now and the one thing ive always wanted
to do was see a live preview of my php so i can format tables without
having to save and upload everytime- i figured out how to make
dreamweaver do that! for the most part its pretty awesome (bulky/wierd
php tho) but theres one thing that i JUST CANT FIGURE OUT- i have a
recordset that will not return null from a querystring. when i feed the
search results script an 'empty' variable (i just hit enter on the
search form without typing in a query) it lists all of the entries
instead of none of them. if anyone has ran into this situation before
id really like to know what you did. its probably one stupid little
setting that im being an idiot about, like it usually is, but i spent
all night last night running through these groups and running through
documentation. thanks a lot!


Funny, just answered a post just like this is the dreamweaver group :o)

As i said, can you post some code?

--
Andy Jacobs
www.redcatmedia.net
Intelligent Websites For Intelligent Business People
Jul 17 '05 #2
really? cause i posted on the dreamweaver group too, but i didnt see a
reply. iunno, maybe its a coincidence? :) anyway here is all the code
that i THINK is relevant:

$colname_search_results = "1";
if (isset($_POST['key_words'])) {
$colname_search_results = (get_magic_quotes_gpc()) ?
$_POST['key_words'] : addslashes($_POST['key_words']);
}
mysql_select_db($database_QCBD, $QCBD);
$query_search_results = sprintf("SELECT * FROM qcbd WHERE key_words
LIKE '%%%s%%' ORDER BY client_id ASC", $colname_search_results);
$query_limit_search_results = sprintf("%s LIMIT %d, %d",
$query_search_results, $startRow_search_results,
$maxRows_search_results);
$search_results = mysql_query($query_limit_search_results, $QCBD) or
die(mysql_error());
$row_search_results = mysql_fetch_assoc($search_results);
again, i havent been coding for a long time so its hard for me to
understand some of what dreamweaver is doing. im not clear on what the
$colname_search_results does and i dont know what '%%%s%%' is. i know
the % are wildcards, but when i did something like this before it was
something like '%{$key_word}%' im not clear on what the 's' is, i dont
see it defined anywhere. anyway, if this makes it anymore clear im
dying to figure out what im doing wrong. thanks a lot!

Jul 17 '05 #3
I noticed that Message-ID:
<11**********************@g14g2000cwa.googlegroups .com> from kiqyou_vf
contained the following:
$query_search_results = sprintf("SELECT * FROM qcbd WHERE key_words
LIKE '%%%s%%' ORDER BY client_id ASC", $colname_search_results);


The percentage char is a wild card. For instance %$myvar% would match
$myvar with anything in front and anything after.

If your $colname_search_results is empty you are saying where key words
= anything so you get all records.

--
Geoff Berrow (put thecat out to email)
It's only Usenet, no one dies.
My opinions, not the committee's, mine.
Simple RFDs http://www.ckdog.co.uk/rfdmaker/
Jul 17 '05 #4
Hi,

try this:

$colname_search_results = "-1";

Note the -ve sign.

I hope this will help. as the problem you are talking about does not
happen to me and I use -1.

Thanks
Bye

Jul 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: jm | last post by:
Somebody on here recommended Dreamweaver with PHP. I am coming from (still using really) ASP and ASP.NET. PHP is more like ASP and not a whole lot like .net, but I wanted to know how Dreamweaver...
3
by: Craig Keightley | last post by:
I can add a repeat region no problem to a page, but how do i reset the recordset to add a second loop Is it something to do with reset()
6
by: pam | last post by:
sorry for my poor english first. $notation=$rs->fields; if(!empty($notation)) echo $notation; the notation field in database is a text type, when the value is null, it will cause a mistake;...
0
by: elcc1958 | last post by:
I need to support a VB6 application that will be receiving disconnected ADODB.Recordset from out DotNet solution. Our dotnet solution deals with System.Data.DataTable. I need to populate a...
5
by: I.P. Freely | last post by:
Hi, I've been using Visual Studio.NET for a while to design WinForms and Console apps and love it. Recently I had to a WebForms app. Because I have no artistic skill whatsoever, I enlisted the...
14
by: deko | last post by:
For some reason this does not seem to be working... Am I missing something basic? Dim rst As DAO.Recordset Dim db As DAO.Database Set db = CurrentDb Set rst = db.OpenRecordset("qryEmailS") '...
1
by: Shun | last post by:
Hello, I have design a website using Dreamweaver 8. now the buttons which are added in dreamweaver 8 I can't see in the Visual Studio .Net (ASP.net) rather i can see in the browser. 2....
0
by: Wipson Chayns | last post by:
Hi friends, I need your help. I have a project (a job, in fact) that requires a feature that Dreamweaver doesn't offer (now). I need a tool--or a concrete, functional technique--to create...
9
ADezii
by: ADezii | last post by:
One question which pops up frequently here at TheScripts is: 'How do I retrieve data from a Recordset once I've created it?' One very efficient, and not that often used approach, is the GetRows()...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.