Jump to content

[SOLVED] Parse database result - Obvious but I'm missing it


amites

Recommended Posts

Hello,

 

I'm working on a script to verify results and having trouble pulling the data out of a field

 

the problem I'm having is gathering values from this query, I know it's something stupid and obvious after I racked my blain for hours last night trying different things I'm not seeing it this morning either...

 

any suggestions are appreciated

 

	$result_event = doQuery("SELECT Cost, firstTik, reservedTik FROM " . HC_TblPrefix . "events WHERE PkID='%s'",
					mysql_real_escape_string($p->ipn_data['item_number']));

$holder = $p->ipn_data['quantity'] * mysql_result($result_event,0);

Link to comment
Share on other sites

not familiar with real_escape_string have to try that one next,

 

the %s is out of the manual as a wildcard to be swapped out with the mysql_real_escape_string which cleans up entries to avoid malicious code...

 

 

I verified $p->ipn_data['item_number'] has a value

 

but nothing I'm pulling from the DB has a value,

 

tried a number of different methods for fetching values from the data, starting to question myself on this one...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.