On Tue, January 30, 2007 7:23 pm, Craige Leeder wrote:
>> atleast this part: $user_id = mysql_real_escape_string((int)
>> $_GET['user_id']);
>
> I'm not sure who put this in there, but you don't need to use
> mysql_real_escape_string() on that value if you're type casting it. If
> you are forcing i
On Tue, January 30, 2007 4:14 pm, nitrox . wrote:
> Richard, ive included your suggested code and now my php script is
> working
> properly. But I dont want to be a php copy/paste newb who has no clue
> of how
> things are working. If its not too much would you (or anybody) give a
> brief
> explana
atleast this part: $user_id = mysql_real_escape_string((int)
$_GET['user_id']);
I'm not sure who put this in there, but you don't need to use
mysql_real_escape_string() on that value if you're type casting it. If
you are forcing it to be an integer, there is nothing to escape.
Integers are perfe
At 1/30/2007 02:14 PM, nitrox . wrote:
If its not too much would you (or anybody) give a brief explanation
of what this code is doing? Or are there any tutorials online that I
can read that will educate me on this? Thanks again to all for your
replies. Ive saved them all for future reference.
Thanks to all who have replied. As you probably have noticed im a total
novice to php who is trying to achieve big things.
Richard, ive included your suggested code and now my php script is working
properly. But I dont want to be a php copy/paste newb who has no clue of how
things are working.
On Mon, January 29, 2007 7:43 pm, Larry Garfield wrote:
> On Monday 29 January 2007 7:19 pm, Richard Lynch wrote:
>
>> Looks like PostgreSQL caved in to the unwashed masses of MySQL users
>> who couldn't handle not putting apostrophes around everything to
>> me...
>> [sigh]
>>
>> :-) :-) :-)
>>
>>
On Monday 29 January 2007 7:19 pm, Richard Lynch wrote:
> Looks like PostgreSQL caved in to the unwashed masses of MySQL users
> who couldn't handle not putting apostrophes around everything to me...
> [sigh]
>
> :-) :-) :-)
>
> Oh well.
>
> I personally would prefer that the DB not accept bogus i
On Mon, January 29, 2007 6:55 pm, Roman Neuhauser wrote:
> # [EMAIL PROTECTED] / 2007-01-29 17:54:03 -0600:
>> MySQL is the *only* db engine that lets you get away with [bleep]
>> like
>> apostrophes around numbers.
>
> Actually, these are examples of valid SQL: INTEGER '1', FLOAT '13.5'.
> test=#
# [EMAIL PROTECTED] / 2007-01-29 17:54:03 -0600:
> MySQL is the *only* db engine that lets you get away with [bleep] like
> apostrophes around numbers.
Actually, these are examples of valid SQL: INTEGER '1', FLOAT '13.5'.
test=# select version();
versi
On Sun, January 28, 2007 6:20 pm, Larry Garfield wrote:
> On Sunday 28 January 2007 5:54 pm, Francisco M. Marzoa Alonso wrote:
>> On dom, 2007-01-28 at 18:51 -0500, nitrox . wrote:
>> > I took the quotes off. I thought that quotes around numbers was
>> wrong
>> > also.
>>
>> Quotes are no necessary
> January 28, 2007 6:20 pm, Larry Garfield wrote:
> On Sunday 28 January 2007 5:54 pm, Francisco M. Marzoa Alonso wrote:
>> On dom, 2007-01-28 at 18:51 -0500, nitrox . wrote:
>> > I took the quotes off. I thought that quotes around numbers was
>> wrong
>> > also.
>>
>> Quotes are no necessary aroun
On Sun, January 28, 2007 5:21 pm, nitrox . wrote:
> Im trying to display one record at a time by ID. Well im getting a
> blank
> page. Ive looked over my code and tried 20 different ways to get it to
> work
> to no avail. So any pointers on what Im doing wrong would be great.
> here is
> the code i
On Sun, 2007-01-28 at 21:12 -0500, Craige Leeder wrote:
> As someone else already stated, my best guess according to that error
> is that $user_id has a null, or inappropriate value. The error occurs
> at the last character of the query, so it has to be something like
> hat. Echo the query and let
As someone else already stated, my best guess according to that error
is that $user_id has a null, or inappropriate value. The error occurs
at the last character of the query, so it has to be something like
hat. Echo the query and let us know what it outputs.
- Craige
On 1/28/07, Francisco M. Ma
On dom, 2007-01-28 at 18:20 -0600, Larry Garfield wrote:
> On Sunday 28 January 2007 5:54 pm, Francisco M. Marzoa Alonso wrote:
> > On dom, 2007-01-28 at 18:51 -0500, nitrox . wrote:
> > > I took the quotes off. I thought that quotes around numbers was wrong
> > > also.
> >
> > Quotes are no necess
On Sunday 28 January 2007 5:54 pm, Francisco M. Marzoa Alonso wrote:
> On dom, 2007-01-28 at 18:51 -0500, nitrox . wrote:
> > I took the quotes off. I thought that quotes around numbers was wrong
> > also.
>
> Quotes are no necessary around numeric values, but they aren't wrong
> neither, simply op
On dom, 2007-01-28 at 18:51 -0500, nitrox . wrote:
> I took the quotes off. I thought that quotes around numbers was wrong also.
Quotes are no necessary around numeric values, but they aren't wrong
neither, simply optional.
> I added the error checking and this is the error:
>
> Could not perfo
At 1/28/2007 03:21 PM, nitrox . wrote:
Im trying to display one record at a time by ID. Well im getting a
blank page. Ive looked over my code and tried 20 different ways to
get it to work to no avail. So any pointers on what Im doing wrong
would be great. here is the code im working with so far
Ops!, Better this one:
$query = "SELECT inf_member WHERE user_id='$user_id' ";
$result = mysql_query($query);
if ( ! $result ) {
die ("Could not perform query $query: ".mysql_error()."\n");
}
I did copy and paste from my own code and you've not $que
I took the quotes off. I thought that quotes around numbers was wrong also.
I added the error checking and this is the error:
Could not perform query : You have an error in your SQL syntax; check the
manual that corresponds to your MySQL server version for the right syntax to
use near '' at li
The first thing that I probably do is to check for possible errors from
DB:
$result = mysql_query("SELECT * FROM inf_member WHERE
user_id='$user_id' ");
if ( ! $result ) {
die ("Could not perform query $query: ".mysql_error()."\n");
}
Regards,
On dom, 200
Before I ask my next question I just wanted to thank you all for being in
this mailing community and sharing your knowledge. Its communitys like this
that make life easier for all of us. Ok enough with the mushy stuff
Im trying to display one record at a time by ID. Well im getting a blank
pag
22 matches
Mail list logo